Move relationships out of Relationships.pm and in to the respective classes. Removed...
[dbsrgits/DBIx-Class.git] / t / lib / DBICTest / Schema / ArtistUndirectedMap.pm
CommitLineData
c6d74d3e 1package # hide from PAUSE
2 DBICTest::Schema::ArtistUndirectedMap;
5efe4c79 3
4use base 'DBIx::Class::Core';
5
6__PACKAGE__->table('artist_undirected_map');
0009fa49 7__PACKAGE__->add_columns(
8 'id1' => { data_type => 'integer' },
9 'id2' => { data_type => 'integer' },
10);
5efe4c79 11__PACKAGE__->set_primary_key(qw/id1 id2/);
12
ff657a43 13__PACKAGE__->belongs_to( 'artist1', 'DBICTest::Schema::Artist', 'id1' );
14__PACKAGE__->belongs_to( 'artist2', 'DBICTest::Schema::Artist', 'id2');
15__PACKAGE__->has_many(
16 'mapped_artists', 'DBICTest::Schema::Artist',
17 [ {'foreign.artistid' => 'self.id1'}, {'foreign.artistid' => 'self.id2'} ],
18);
19
5efe4c79 201;