1 package # hide from PAUSE
2 DBICTest::Schema::TwoKeys;
7 use base qw/DBICTest::BaseResult/;
9 __PACKAGE__->table('twokeys');
10 __PACKAGE__->add_columns(
11 'artist' => { data_type => 'integer' },
12 'cd' => { data_type => 'integer' },
14 __PACKAGE__->set_primary_key(qw/artist cd/);
16 __PACKAGE__->belongs_to(
17 artist => 'DBICTest::Schema::Artist',
18 {'foreign.artistid'=>'self.artist'},
21 __PACKAGE__->belongs_to( cd => 'DBICTest::Schema::CD', undef, { is_deferrable => 0, add_fk_index => 0 } );
23 __PACKAGE__->has_many(
24 'fourkeys_to_twokeys', 'DBICTest::Schema::FourKeys_to_TwoKeys', {
25 'foreign.t_artist' => 'self.artist',
26 'foreign.t_cd' => 'self.cd',
29 __PACKAGE__->many_to_many(
30 'fourkeys', 'fourkeys_to_twokeys', 'fourkeys',