X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2Flib%2FDBICTest%2FSchema%2FTrack.pm;h=b82545a25defa6a6aebd33b4ca6ca8b647546d69;hb=4a233f3019d2baa4bf2abee0c873c74d5cdf3a11;hp=6360ca0a92efe6c9ba9751b12a27976c3f3ece53;hpb=a267ea85dbed950ecd00f5e6a139e33b1a67c7bf;p=dbsrgits%2FDBIx-Class.git diff --git a/t/lib/DBICTest/Schema/Track.pm b/t/lib/DBICTest/Schema/Track.pm index 6360ca0..b82545a 100644 --- a/t/lib/DBICTest/Schema/Track.pm +++ b/t/lib/DBICTest/Schema/Track.pm @@ -1,6 +1,9 @@ package # hide from PAUSE DBICTest::Schema::Track; +use warnings; +use strict; + use base qw/DBICTest::BaseResult/; use Carp qw/confess/; @@ -69,8 +72,8 @@ __PACKAGE__->belongs_to( { join_type => 'left' }, ); -__PACKAGE__->might_have ( - next_track => __PACKAGE__, +__PACKAGE__->has_many ( + next_tracks => __PACKAGE__, sub { my $args = shift; @@ -87,8 +90,8 @@ __PACKAGE__->might_have ( "$args->{foreign_alias}.position" => { '>' => { -ident => "$args->{self_alias}.position" } }, }, $args->{self_rowobj} && { - "$args->{foreign_alias}.cd" => $args->{self_rowobj}->cd, - "$args->{foreign_alias}.position" => { '>' => $args->{self_rowobj}->position }, + "$args->{foreign_alias}.cd" => $args->{self_rowobj}->get_column('cd'), + "$args->{foreign_alias}.position" => { '>' => $args->{self_rowobj}->pos }, } ) }