X-Git-Url: https://git.dogcows.com/gitweb?p=chaz%2Fp5-DBIx-Class-ResultSet-RecursiveUpdate;a=blobdiff_plain;f=t%2Flib%2FDBICTest%2FSchema%2FArtwork.pm;fp=t%2Flib%2FDBICTest%2FSchema%2FArtwork.pm;h=b6c2cff4af505ba42cd7c05c51333df182252b71;hp=0000000000000000000000000000000000000000;hb=584713f437ffa9390821a0580ed368aa22fb552e;hpb=d93b1239cb7de482ac79a091d7daa67115596306 diff --git a/t/lib/DBICTest/Schema/Artwork.pm b/t/lib/DBICTest/Schema/Artwork.pm new file mode 100644 index 0000000..b6c2cff --- /dev/null +++ b/t/lib/DBICTest/Schema/Artwork.pm @@ -0,0 +1,26 @@ +package # hide from PAUSE + DBICTest::Schema::Artwork; + +use base qw/DBIx::Class::Core/; + +__PACKAGE__->table('cd_artwork'); +__PACKAGE__->add_columns( + 'cd_id' => { + data_type => 'integer', + }, +); +__PACKAGE__->set_primary_key('cd_id'); +__PACKAGE__->belongs_to('cd', 'DBICTest::Schema::CD', 'cd_id'); +__PACKAGE__->has_many('images', 'DBICTest::Schema::Image', 'artwork_id'); + +__PACKAGE__->has_many('artwork_to_artist', 'DBICTest::Schema::Artwork_to_Artist', 'artwork_cd_id'); +__PACKAGE__->many_to_many('artists', 'artwork_to_artist', 'artist'); + +__PACKAGE__->resultset_class( __PACKAGE__ . '::ResultSet'); + +package DBICTest::Schema::Artwork::ResultSet; + +use base qw( DBIx::Class::ResultSet::RecursiveUpdate ); + + +1;