Add strict/warnings test, adjust all offenders (wow, that was a lot)
[dbsrgits/DBIx-Class.git] / t / lib / DBICTest / Schema / TwoKeys.pm
CommitLineData
c6d74d3e 1package # hide from PAUSE
2 DBICTest::Schema::TwoKeys;
a02675cd 3
4a233f30 4use warnings;
5use strict;
6
660cf1be 7use base qw/DBICTest::BaseResult/;
a02675cd 8
ff657a43 9__PACKAGE__->table('twokeys');
10__PACKAGE__->add_columns(
0009fa49 11 'artist' => { data_type => 'integer' },
12 'cd' => { data_type => 'integer' },
13);
ff657a43 14__PACKAGE__->set_primary_key(qw/artist cd/);
15
89cf6a70 16__PACKAGE__->belongs_to(
17 artist => 'DBICTest::Schema::Artist',
18 {'foreign.artistid'=>'self.artist'},
19);
20
2581038c 21__PACKAGE__->belongs_to( cd => 'DBICTest::Schema::CD', undef, { is_deferrable => 0, add_fk_index => 0 } );
a02675cd 22
3bd6e3e0 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
a02675cd 331;