X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2Flib%2FDBICTest%2FSchema%2FArtist.pm;h=79132fb166e598a2f1936aa58c3c5b1a7dcb1102;hb=0488c7e1294791e01dc75dfe633454d0f4201384;hp=a99eb7ee14a74532dde95e84bc49791bed0c6ade;hpb=2231d31c29347c34a6b58b88782da220775bddaa;p=dbsrgits%2FDBIx-Class.git diff --git a/t/lib/DBICTest/Schema/Artist.pm b/t/lib/DBICTest/Schema/Artist.pm index a99eb7e..79132fb 100644 --- a/t/lib/DBICTest/Schema/Artist.pm +++ b/t/lib/DBICTest/Schema/Artist.pm @@ -6,6 +6,7 @@ use strict; use base qw/DBICTest::BaseResult/; use Carp qw/confess/; +use Data::Query::ExprDeclare; __PACKAGE__->table('artist'); __PACKAGE__->source_info({ @@ -47,7 +48,8 @@ __PACKAGE__->mk_classdata('field_name_for', { # the undef condition in this rel is *deliberate* # tests oddball legacy syntax __PACKAGE__->has_many( - cds => 'DBICTest::Schema::CD', undef, + cds => 'DBICTest::Schema::CD', + expr { $_->foreign->artist == $_->self->artistid }, { order_by => { -asc => 'year'} }, );