Add strict/warnings test, adjust all offenders (wow, that was a lot)
[dbsrgits/DBIx-Class.git] / t / lib / DBICTest / Schema / ForceForeign.pm
index e3b2857..a870f3e 100644 (file)
@@ -1,7 +1,10 @@
 package # hide from PAUSE
     DBICTest::Schema::ForceForeign;
 
-use base 'DBIx::Class::Core';
+use warnings;
+use strict;
+
+use base qw/DBICTest::BaseResult/;
 
 __PACKAGE__->table('forceforeign');
 __PACKAGE__->add_columns(
@@ -12,21 +15,21 @@ __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,
-                       },
+__PACKAGE__->might_have('artist_1', 'DBICTest::Schema::Artist',
+  { 'foreign.artistid' => '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 },
 );
 
 # 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,
-                       },
+__PACKAGE__->belongs_to('cd_3', 'DBICTest::Schema::CD',
+  { 'foreign.cdid' => 'self.cd' },
+  { is_foreign_key_constraint => 0 },
 );
 
 1;