[Bast-commits] r3880 - DBIx-Class/0.08/trunk/t/lib/DBICTest/Schema

ash at dev.catalyst.perl.org ash at dev.catalyst.perl.org
Thu Nov 15 13:02:15 GMT 2007


Author: ash
Date: 2007-11-15 13:02:15 +0000 (Thu, 15 Nov 2007)
New Revision: 3880

Added:
   DBIx-Class/0.08/trunk/t/lib/DBICTest/Schema/ForceForeign.pm
Log:
Adding missing file

Added: DBIx-Class/0.08/trunk/t/lib/DBICTest/Schema/ForceForeign.pm
===================================================================
--- DBIx-Class/0.08/trunk/t/lib/DBICTest/Schema/ForceForeign.pm	                        (rev 0)
+++ DBIx-Class/0.08/trunk/t/lib/DBICTest/Schema/ForceForeign.pm	2007-11-15 13:02:15 UTC (rev 3880)
@@ -0,0 +1,32 @@
+package # hide from PAUSE
+    DBICTest::Schema::ForceForeign;
+
+use base 'DBIx::Class::Core';
+
+__PACKAGE__->table('forceforeign');
+__PACKAGE__->add_columns(
+  'artist' => { data_type => 'integer' },
+  'cd' => { data_type => 'integer' },
+);
+__PACKAGE__->set_primary_key(qw/artist/);
+
+# Normally this would not appear as a FK constraint
+# since it uses the PK
+__PACKAGE__->might_have(
+			'artist_1', 'DBICTest::Schema::Artist', {
+			    'foreign.artist_id' => 'self.artist',
+			}, {
+			    is_foreign_key_constraint => 1,
+			},
+);
+
+# Normally this would appear as a FK constraint
+__PACKAGE__->might_have(
+			'cd_1', 'DBICTest::Schema::CD', {
+			    'foreign.cdid' => 'self.cd',
+			}, {
+			    is_foreign_key_constraint => 0,
+			},
+);
+
+1;




More information about the Bast-commits mailing list