| 1 | package DBIO::Test::Schema::TwoKeys; | ||
| 2 | # ABSTRACT: Test result class for the twokeys table | ||
| 3 | |||
| 4 | 256 | ▶ | use warnings; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 5 | |||
| 6 | 256 | our $VERSION = '0.900007'; | |
| 7 | |||
| 8 | 256 | ▶ | use strict; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 9 | |||
| 10 | 256 | ▶ | use base qw/DBIO::Test::BaseResult/; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 11 | |||
| 12 | 256 | __PACKAGE__->table('twokeys'); | |
| 13 | 256 | __PACKAGE__->add_columns( | |
| 14 | 'artist' => { data_type => 'integer' }, | ||
| 15 | 'cd' => { data_type => 'integer' }, | ||
| 16 | ); | ||
| 17 | 256 | __PACKAGE__->set_primary_key(qw/artist cd/); | |
| 18 | |||
| 19 | 256 | __PACKAGE__->belongs_to( | |
| 20 | artist => 'DBIO::Test::Schema::Artist', | ||
| 21 | {'foreign.artistid'=>'self.artist'}, | ||
| 22 | ); | ||
| 23 | |||
| 24 | 256 | __PACKAGE__->belongs_to( cd => 'DBIO::Test::Schema::CD', undef, { is_deferrable => 0, on_update => undef, on_delete => undef, add_fk_index => 0 } ); | |
| 25 | |||
| 26 | 256 | __PACKAGE__->has_many( | |
| 27 | 'fourkeys_to_twokeys', 'DBIO::Test::Schema::FourKeys_to_TwoKeys', { | ||
| 28 | 'foreign.t_artist' => 'self.artist', | ||
| 29 | 'foreign.t_cd' => 'self.cd', | ||
| 30 | }); | ||
| 31 | |||
| 32 | 256 | __PACKAGE__->many_to_many( | |
| 33 | 'fourkeys', 'fourkeys_to_twokeys', 'fourkeys', | ||
| 34 | ); | ||
| 35 | |||
| 36 | 256 | 1; | |
| 37 | |||
| 38 | __END__ | ||