X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2Flib%2FDBICTest%2FSchema%2FArtist.pm;h=e86aae0a68d24332b05906f0c4e108207d587a03;hb=abf8d91e24dae052a0af4b65ffee4e72044d54bb;hp=48538bcef0b22af1a4028a0bc9927543879bf673;hpb=f3cfaac640901858c6d9983758e5485ae9baf30f;p=dbsrgits%2FDBIx-Class.git diff --git a/t/lib/DBICTest/Schema/Artist.pm b/t/lib/DBICTest/Schema/Artist.pm index 48538bc..e86aae0 100644 --- a/t/lib/DBICTest/Schema/Artist.pm +++ b/t/lib/DBICTest/Schema/Artist.pm @@ -63,13 +63,18 @@ __PACKAGE__->has_many( }, ); + __PACKAGE__->has_many( - cds_90s => 'DBICTest::Schema::CD', + cds_84 => 'DBICTest::Schema::CD', sub { my $args = shift; return ( { "$args->{foreign_alias}.artist" => { -ident => "$args->{self_alias}.artistid" }, - "$args->{foreign_alias}.year" => { '>' => 1989, '<' => 2000 }, + "$args->{foreign_alias}.year" => 1984, + }, + $args->{self_rowobj} && { + "$args->{foreign_alias}.artist" => $args->{self_rowobj}->artistid, + "$args->{foreign_alias}.year" => 1984, } ); } @@ -77,16 +82,12 @@ __PACKAGE__->has_many( __PACKAGE__->has_many( - cds_84 => 'DBICTest::Schema::CD', + cds_90s => 'DBICTest::Schema::CD', sub { my $args = shift; return ( { "$args->{foreign_alias}.artist" => { -ident => "$args->{self_alias}.artistid" }, - "$args->{foreign_alias}.year" => 1984, - }, - $args->{self_rowobj} && { - "$args->{foreign_alias}.artist" => $args->{self_rowobj}->artistid, - "$args->{foreign_alias}.year" => 1984, + "$args->{foreign_alias}.year" => { '>' => 1989, '<' => 2000 }, } ); }