b416797ed093bf3efb80655100d135ae21f077cf
[dbsrgits/DBIx-Class.git] / t / lib / DBICTest / Schema / CD_to_Producer.pm
1 package # hide from PAUSE
2     DBICTest::Schema::CD_to_Producer;
3
4 use warnings;
5 use strict;
6
7 use base qw/DBICTest::BaseResult/;
8
9 __PACKAGE__->table('cd_to_producer');
10 __PACKAGE__->add_columns(
11   cd => { data_type => 'integer' },
12   producer => { data_type => 'integer' },
13   attribute => { data_type => 'integer', is_nullable => 1 },
14 );
15 __PACKAGE__->set_primary_key(qw/cd producer/);
16
17 __PACKAGE__->belongs_to(
18   'cd', 'DBICTest::Schema::CD',
19   { 'foreign.cdid' => 'self.cd' }
20 );
21
22 __PACKAGE__->belongs_to(
23   'producer', 'DBICTest::Schema::Producer',
24   { 'foreign.producerid' => 'self.producer' },
25   { on_delete => undef, on_update => undef },
26 );
27
28 1;