Commit | Line | Data |
8273e845 |
1 | package # hide from PAUSE |
c6d74d3e |
2 | DBICTest::Schema::CD_to_Producer; |
30a8108e |
3 | |
4a233f30 |
4 | use warnings; |
5 | use strict; |
6 | |
660cf1be |
7 | use base qw/DBICTest::BaseResult/; |
30a8108e |
8 | |
9 | __PACKAGE__->table('cd_to_producer'); |
0009fa49 |
10 | __PACKAGE__->add_columns( |
11 | cd => { data_type => 'integer' }, |
12 | producer => { data_type => 'integer' }, |
ac36a402 |
13 | attribute => { data_type => 'integer', is_nullable => 1 }, |
0009fa49 |
14 | ); |
30a8108e |
15 | __PACKAGE__->set_primary_key(qw/cd producer/); |
16 | |
98fcc1c0 |
17 | # the undef condition in this rel is *deliberate* |
18 | # tests oddball legacy syntax |
ff657a43 |
19 | __PACKAGE__->belongs_to( |
98fcc1c0 |
20 | 'cd', 'DBICTest::Schema::CD' |
ff657a43 |
21 | ); |
22 | |
23 | __PACKAGE__->belongs_to( |
24 | 'producer', 'DBICTest::Schema::Producer', |
87310237 |
25 | { 'foreign.producerid' => 'self.producer' }, |
26 | { on_delete => undef, on_update => undef }, |
ff657a43 |
27 | ); |
28 | |
30a8108e |
29 | 1; |