add warning for custom resultsources through ->name(SCALARREF) on ->deploy
[dbsrgits/DBIx-Class-Historic.git] / t / lib / DBICTest / Schema / TwoKeys.pm
CommitLineData
c6d74d3e 1package # hide from PAUSE
2 DBICTest::Schema::TwoKeys;
a02675cd 3
660cf1be 4use base qw/DBICTest::BaseResult/;
a02675cd 5
ff657a43 6__PACKAGE__->table('twokeys');
7__PACKAGE__->add_columns(
0009fa49 8 'artist' => { data_type => 'integer' },
9 'cd' => { data_type => 'integer' },
10);
ff657a43 11__PACKAGE__->set_primary_key(qw/artist cd/);
12
89cf6a70 13__PACKAGE__->belongs_to(
14 artist => 'DBICTest::Schema::Artist',
15 {'foreign.artistid'=>'self.artist'},
16);
17
2581038c 18__PACKAGE__->belongs_to( cd => 'DBICTest::Schema::CD', undef, { is_deferrable => 0, add_fk_index => 0 } );
a02675cd 19
3bd6e3e0 20__PACKAGE__->has_many(
21 'fourkeys_to_twokeys', 'DBICTest::Schema::FourKeys_to_TwoKeys', {
22 'foreign.t_artist' => 'self.artist',
23 'foreign.t_cd' => 'self.cd',
24});
25
26__PACKAGE__->many_to_many(
27 'fourkeys', 'fourkeys_to_twokeys', 'fourkeys',
28);
29
a02675cd 301;