Add strict/warnings test, adjust all offenders (wow, that was a lot)
[dbsrgits/DBIx-Class.git] / t / lib / DBICTest / Schema / TwoKeys.pm
1 package # hide from PAUSE
2     DBICTest::Schema::TwoKeys;
3
4 use warnings;
5 use strict;
6
7 use base qw/DBICTest::BaseResult/;
8
9 __PACKAGE__->table('twokeys');
10 __PACKAGE__->add_columns(
11   'artist' => { data_type => 'integer' },
12   'cd' => { data_type => 'integer' },
13 );
14 __PACKAGE__->set_primary_key(qw/artist cd/);
15
16 __PACKAGE__->belongs_to(
17     artist => 'DBICTest::Schema::Artist',
18     {'foreign.artistid'=>'self.artist'},
19 );
20
21 __PACKAGE__->belongs_to( cd => 'DBICTest::Schema::CD', undef, { is_deferrable => 0, add_fk_index => 0 } );
22
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',
27 });
28
29 __PACKAGE__->many_to_many(
30   'fourkeys', 'fourkeys_to_twokeys', 'fourkeys',
31 );
32
33 1;