belongs_to relationships are explicitly flagged by default, to aid the DBIC SQLT...
[dbsrgits/DBIx-Class.git] / t / lib / DBICTest / Schema / ForceForeign.pm
index e3b2857..82829b8 100644 (file)
@@ -14,7 +14,7 @@ __PACKAGE__->set_primary_key(qw/artist/);
 # since it uses the PK
 __PACKAGE__->might_have(
                        'artist_1', 'DBICTest::Schema::Artist', {
-                           'foreign.artist_id' => 'self.artist',
+                           'foreign.artistid' => 'self.artist',
                        }, {
                            is_foreign_key_constraint => 1,
                        },
@@ -29,4 +29,13 @@ __PACKAGE__->might_have(
                        },
 );
 
+# Normally this would appear as a FK constraint
+__PACKAGE__->belongs_to(
+                       'cd_3', 'DBICTest::Schema::CD', {
+                           'foreign.cdid' => 'self.cd',
+                       }, {
+                           is_foreign_key_constraint => 0,
+                       },
+);
+
 1;