f4e9aa4662142d08cf9db8c64279e919320a37be
[dbsrgits/DBIx-Class.git] / t / lib / DBICTest / Schema / FourKeys_to_TwoKeys.pm
1 package # hide from PAUSE
2     DBICTest::Schema::FourKeys_to_TwoKeys;
3
4 use base qw/DBICTest::BaseResult/;
5
6 __PACKAGE__->table('fourkeys_to_twokeys');
7 __PACKAGE__->add_columns(
8   'f_foo' => { data_type => 'integer' },
9   'f_bar' => { data_type => 'integer' },
10   'f_hello' => { data_type => 'integer' },
11   'f_goodbye' => { data_type => 'integer' },
12   't_artist' => { data_type => 'integer' },
13   't_cd' => { data_type => 'integer' },
14   'autopilot' => { data_type => 'character' },
15   'pilot_sequence' => { data_type => 'integer', is_nullable => 1 },
16 );
17 __PACKAGE__->set_primary_key(
18   qw/f_foo f_bar f_hello f_goodbye t_artist t_cd/
19 );
20
21 __PACKAGE__->belongs_to('fourkeys', 'DBICTest::Schema::FourKeys', {
22   'foreign.foo' => 'self.f_foo',
23   'foreign.bar' => 'self.f_bar',
24   'foreign.hello' => 'self.f_hello',
25   'foreign.goodbye' => 'self.f_goodbye',
26 });
27
28 __PACKAGE__->belongs_to('twokeys', 'DBICTest::Schema::TwoKeys', {
29   'foreign.artist' => 'self.t_artist',
30   'foreign.cd' => 'self.t_cd',
31 });
32
33 1;