Add strict/warnings test, adjust all offenders (wow, that was a lot)
[dbsrgits/DBIx-Class.git] / t / lib / DBICTest / Schema / ArtistUndirectedMap.pm
1 package # hide from PAUSE
2     DBICTest::Schema::ArtistUndirectedMap;
3
4 use warnings;
5 use strict;
6
7 use base qw/DBICTest::BaseResult/;
8
9 __PACKAGE__->table('artist_undirected_map');
10 __PACKAGE__->add_columns(
11   'id1' => { data_type => 'integer' },
12   'id2' => { data_type => 'integer' },
13 );
14 __PACKAGE__->set_primary_key(qw/id1 id2/);
15
16 __PACKAGE__->belongs_to( 'artist1', 'DBICTest::Schema::Artist', 'id1', { on_delete => 'RESTRICT', on_update => 'CASCADE'} );
17 __PACKAGE__->belongs_to( 'artist2', 'DBICTest::Schema::Artist', 'id2', { on_delete => undef, on_update => undef} );
18 __PACKAGE__->has_many(
19   'mapped_artists', 'DBICTest::Schema::Artist',
20   [ {'foreign.artistid' => 'self.id1'}, {'foreign.artistid' => 'self.id2'} ],
21   { cascade_delete => 0 },
22 );
23
24 1;