]>
Dogcows Code - chaz/p5-DBIx-Class-ResultSet-RecursiveUpdate/blob - ArtistUndirectedMap.pm
c709572c8e5fac104aad81acddc3442c5ed86e19
1 package # hide from PAUSE
2 DBICTest
::Schema
::ArtistUndirectedMap
;
4 use base
'DBIx::Class::Core';
6 __PACKAGE__-
>table('artist_undirected_map');
7 __PACKAGE__-
>add_columns(
8 'id1' => { data_type
=> 'integer' },
9 'id2' => { data_type
=> 'integer' },
11 __PACKAGE__-
>set_primary_key(qw
/id1 id2/);
13 __PACKAGE__-
>belongs_to( 'artist1', 'DBICTest::Schema::Artist', 'id1', { on_delete
=> 'RESTRICT', on_update
=> 'CASCADE'} );
14 __PACKAGE__-
>belongs_to( 'artist2', 'DBICTest::Schema::Artist', 'id2', { on_delete
=> undef, on_update
=> 'CASCADE'} );
15 __PACKAGE__-
>has_many(
16 'mapped_artists', 'DBICTest::Schema::Artist',
17 [ {'foreign.artistid' => 'self.id1'}, {'foreign.artistid' => 'self.id2'} ],
This page took 0.036075 seconds and 3 git commands to generate.