- Fix count() with group_by aliased-function resultsets
- Massive refactor and cleanup of primary key handling
- Fixed regression losing custom result_class (really this time)
+ (RT#54697)
+ - Fixed regression in DBIC SQLT::Parser failing with a classname
+ (as opposed to a schema object)
0.08119 2010-02-15 09:36:00 (UTC)
- Add $rs->is_ordered to test for existing order_by on a resultset
sub parse {
# this is a hack to prevent schema leaks due to a retarded SQLT implementation
# DO NOT REMOVE (until SQLT2 is out, the all of this will be rewritten anyway)
- Scalar::Util::weaken ($_[1]);
+ Scalar::Util::weaken ($_[1]) if ref ($_[1]);
my ($tr, $data) = @_;
my $args = $tr->parser_args;
# Test for SQLT-related leaks
{
my $s = DBICTest::Schema->clone;
- create_schema ({ schema => $s });
+ my $sqlt_schema = create_schema ({ schema => $s });
Scalar::Util::weaken ($s);
ok (!$s, 'Schema not leaked');
+
+ isa_ok ($sqlt_schema, 'SQL::Translator::Schema', 'SQLT schema object produced');
}
+# make sure classname-style works
+lives_ok { isa_ok (create_schema ({ schema => 'DBICTest::Schema' }), 'SQL::Translator::Schema', 'SQLT schema object produced') };
+
my $schema = DBICTest->init_schema();
# Dummy was yanked out by the sqlt hook test