[Bast-commits] r8202 - in
DBIx-Class/0.08/branches/oracle_shorten_aliases/t: .
lib/DBICTest/Schema
caelum at dev.catalyst.perl.org
caelum at dev.catalyst.perl.org
Thu Dec 31 17:55:50 GMT 2009
Author: caelum
Date: 2009-12-31 17:55:50 +0000 (Thu, 31 Dec 2009)
New Revision: 8202
Modified:
DBIx-Class/0.08/branches/oracle_shorten_aliases/t/73oracle.t
DBIx-Class/0.08/branches/oracle_shorten_aliases/t/lib/DBICTest/Schema/Artist.pm
Log:
failing test
Modified: DBIx-Class/0.08/branches/oracle_shorten_aliases/t/73oracle.t
===================================================================
--- DBIx-Class/0.08/branches/oracle_shorten_aliases/t/73oracle.t 2009-12-31 17:29:51 UTC (rev 8201)
+++ DBIx-Class/0.08/branches/oracle_shorten_aliases/t/73oracle.t 2009-12-31 17:55:50 UTC (rev 8202)
@@ -124,12 +124,23 @@
is($new->artistid, 1, "Oracle Auto-PK worked");
my $cd = $schema->resultset('CD')->create({ artist => 1, title => 'EP C', year => '2003' });
-is($new->artistid, 1, "Oracle Auto-PK worked - using scalar ref as table name");
+is($cd->cdid, 1, "Oracle Auto-PK worked - using scalar ref as table name");
# test again with fully-qualified table name
$new = $schema->resultset('ArtistFQN')->create( { name => 'bar' } );
is( $new->artistid, 2, "Oracle Auto-PK worked with fully-qualified tablename" );
+# test rel names over the 30 char limit
+my $query = $schema->resultset('Artist')->search({
+ 'cds_very_very_very_long_relationship_name.title' => 'EP C'
+}, {
+ prefetch => 'cds_very_very_very_long_relationship_name'
+});
+
+lives_and {
+ is $query->first->cds_very_very_very_long_relationship_name->cdid, 1
+} 'query with rel name over 30 chars survived and worked';
+
# test join with row count ambiguity
my $track = $schema->resultset('Track')->create({ trackid => 1, cd => 1,
Modified: DBIx-Class/0.08/branches/oracle_shorten_aliases/t/lib/DBICTest/Schema/Artist.pm
===================================================================
--- DBIx-Class/0.08/branches/oracle_shorten_aliases/t/lib/DBICTest/Schema/Artist.pm 2009-12-31 17:29:51 UTC (rev 8201)
+++ DBIx-Class/0.08/branches/oracle_shorten_aliases/t/lib/DBICTest/Schema/Artist.pm 2009-12-31 17:55:50 UTC (rev 8202)
@@ -44,6 +44,9 @@
__PACKAGE__->has_many(
cds_unordered => 'DBICTest::Schema::CD'
);
+__PACKAGE__->has_many(
+ cds_very_very_very_long_relationship_name => 'DBICTest::Schema::CD'
+);
__PACKAGE__->has_many( twokeys => 'DBICTest::Schema::TwoKeys' );
__PACKAGE__->has_many( onekeys => 'DBICTest::Schema::OneKey' );
More information about the Bast-commits
mailing list