X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2Flib%2FDBICTest%2FSchema%2FBasicRels.pm;h=fedeec94fa6964a558777b99fc5e7fcf32a46ddf;hb=64acc2bc801dcc1c982b16fe45434e9b82edcef6;hp=9894bb94e45cd1c85686918fc80beb3240cdbf87;hpb=7b0fc1bee6c2168a7aa6455051c8ef085f1d99c3;p=dbsrgits%2FDBIx-Class-Historic.git diff --git a/t/lib/DBICTest/Schema/BasicRels.pm b/t/lib/DBICTest/Schema/BasicRels.pm index 9894bb9..fedeec9 100644 --- a/t/lib/DBICTest/Schema/BasicRels.pm +++ b/t/lib/DBICTest/Schema/BasicRels.pm @@ -5,11 +5,12 @@ use base 'DBIx::Class::Core'; DBICTest::Schema::Artist->add_relationship( cds => 'DBICTest::Schema::CD', { 'foreign.artist' => 'self.artistid' }, - { order_by => 'year', join_type => 'LEFT', cascade_delete => 1 } + { order_by => 'year', join_type => 'LEFT', cascade_delete => 1, cascade_copy => 1, accessor => 'multi' } ); DBICTest::Schema::Artist->add_relationship( twokeys => 'DBICTest::Schema::TwoKeys', - { 'foreign.artist' => 'self.artistid' } + { 'foreign.artist' => 'self.artistid' }, + { cascade_copy => 1 } ); DBICTest::Schema::Artist->add_relationship( onekeys => 'DBICTest::Schema::OneKey', @@ -37,7 +38,7 @@ DBICTest::Schema::CD->add_relationship( DBICTest::Schema::CD->add_relationship( tags => 'DBICTest::Schema::Tag', { 'foreign.cd' => 'self.cdid' }, - { join_type => 'LEFT', cascade_delete => 1 } + { join_type => 'LEFT', cascade_delete => 1, cascade_copy => 1 } ); #DBICTest::Schema::CD->might_have(liner_notes => 'DBICTest::Schema::LinerNotes' => qw/notes/); DBICTest::Schema::CD->add_relationship( @@ -77,8 +78,7 @@ DBICTest::Schema::Tag->add_relationship( DBICTest::Schema::Track->add_relationship( cd => 'DBICTest::Schema::CD', - { 'foreign.cdid' => 'self.cd' }, - { accessor => 'single' } + { 'foreign.cdid' => 'self.cd' } ); DBICTest::Schema::TwoKeys->add_relationship( @@ -101,5 +101,6 @@ DBICTest::Schema::CD_to_Producer->add_relationship( # now the Helpers DBICTest::Schema::CD->many_to_many( 'producers', 'cd_to_producer', 'producer'); +DBICTest::Schema::CD->many_to_many( 'producers_sorted', 'cd_to_producer', 'producer', { order_by => 'producer.name' }); 1;