[bigtop] r1557 committed - Fixed bug with composite primary key syntax.

0 views
Skip to first unread message

codesite...@google.com

unread,
Feb 11, 2011, 3:34:00 PM2/11/11
to gan...@googlegroups.com
Revision: 1557
Author: net.angelus
Date: Fri Feb 11 12:33:28 2011
Log: Fixed bug with composite primary key syntax.
http://code.google.com/p/bigtop/source/detail?r=1557

Modified:
/trunk/lib/Bigtop/Backend/Model/GantryDBIxClass.pm
/trunk/t/dbixclass/playpk/Contact/lib/Contact/Model/GEN/bday.pm

=======================================
--- /trunk/lib/Bigtop/Backend/Model/GantryDBIxClass.pm Mon Jun 22 07:40:13
2009
+++ /trunk/lib/Bigtop/Backend/Model/GantryDBIxClass.pm Fri Feb 11 12:33:28
2011
@@ -232,8 +232,8 @@
[% END %]
);
[% END %]
-[% IF primary_key.0.defined %]__PACKAGE__->set_primary_key( [ qw( [%
FOREACH pk IN primary_key %][% pk %][% UNLESS loop.last %] [% END %]
-[% END %] ) ] );
+[% IF primary_key.0.defined %]__PACKAGE__->set_primary_key( qw( [% FOREACH
pk IN primary_key %][% pk %][% UNLESS loop.last %] [% END %]
+[% END %] ) );
[% ELSIF primary_key %]__PACKAGE__->set_primary_key( '[% primary_key +%]'
);[% END +%]
[% FOREACH uq_cons_name IN unique_name.keys.sort %]
__PACKAGE__->add_unique_constraint(
=======================================
--- /trunk/t/dbixclass/playpk/Contact/lib/Contact/Model/GEN/bday.pm Thu
Jun 7 10:28:21 2007
+++ /trunk/t/dbixclass/playpk/Contact/lib/Contact/Model/GEN/bday.pm Fri Feb
11 12:33:28 2011
@@ -11,7 +11,7 @@
contact
bday
/ );
-__PACKAGE__->set_primary_key( [ qw( id subid ) ] );
+__PACKAGE__->set_primary_key( qw( id subid ) );

__PACKAGE__->belongs_to( contact => 'Contact::Model::number' );
__PACKAGE__->base_model( 'Contact::Model' );

Reply all
Reply to author
Forward
0 new messages