| 1 | package DBIO::Test::Schema::ArtistUndirectedMap; | ||
| 2 | # ABSTRACT: Test result class for the artist_undirected_map 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('artist_undirected_map'); | |
| 13 | 256 | __PACKAGE__->add_columns( | |
| 14 | 'id1' => { data_type => 'integer' }, | ||
| 15 | 'id2' => { data_type => 'integer' }, | ||
| 16 | ); | ||
| 17 | 256 | __PACKAGE__->set_primary_key(qw/id1 id2/); | |
| 18 | |||
| 19 | 256 | __PACKAGE__->belongs_to( 'artist1', 'DBIO::Test::Schema::Artist', 'id1', { on_delete => 'RESTRICT', on_update => 'CASCADE'} ); | |
| 20 | 256 | __PACKAGE__->belongs_to( 'artist2', 'DBIO::Test::Schema::Artist', 'id2', { on_delete => undef, on_update => undef} ); | |
| 21 | 256 | __PACKAGE__->has_many( | |
| 22 | 'mapped_artists', 'DBIO::Test::Schema::Artist', | ||
| 23 | [ {'foreign.artistid' => 'self.id1'}, {'foreign.artistid' => 'self.id2'} ], | ||
| 24 | { cascade_delete => 0 }, | ||
| 25 | ); | ||
| 26 | |||
| 27 | 256 | 1; | |
| 28 | |||
| 29 | __END__ | ||