1 package # hide from PAUSE
2 DBICTest::Schema::ForceForeign;
4 use base qw/DBICTest::BaseResult/;
6 __PACKAGE__->table('forceforeign');
7 __PACKAGE__->add_columns(
8 'artist' => { data_type => 'integer' },
9 'cd' => { data_type => 'integer' },
11 __PACKAGE__->set_primary_key(qw/artist/);
13 # Normally this would not appear as a FK constraint
14 # since it uses the PK
15 __PACKAGE__->might_have('artist_1', 'DBICTest::Schema::Artist',
16 { 'foreign.artistid' => 'self.artist' },
17 { is_foreign_key_constraint => 1 },
20 # Normally this would appear as a FK constraint
21 __PACKAGE__->might_have('cd_1', 'DBICTest::Schema::CD',
22 { 'foreign.cdid' => 'self.cd' },
23 { is_foreign_key_constraint => 0 },
26 # Normally this would appear as a FK constraint
27 __PACKAGE__->belongs_to('cd_3', 'DBICTest::Schema::CD',
28 { 'foreign.cdid' => 'self.cd' },
29 { is_foreign_key_constraint => 0 },