From: Peter Rabbitson Date: Thu, 16 Jun 2011 08:22:27 +0000 (+0200) Subject: Fix all invocations of _resolve_condition to match the new signature X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=1327f05075385498a3e6213c068d2f4e765fb0a4;p=dbsrgits%2FDBIx-Class-Historic.git Fix all invocations of _resolve_condition to match the new signature --- diff --git a/lib/DBIx/Class/CDBICompat/ImaDBI.pm b/lib/DBIx/Class/CDBICompat/ImaDBI.pm index 15a125d..85aced2 100644 --- a/lib/DBIx/Class/CDBICompat/ImaDBI.pm +++ b/lib/DBIx/Class/CDBICompat/ImaDBI.pm @@ -55,8 +55,10 @@ __PACKAGE__->mk_classdata('_transform_sql_handlers' => $self->throw_exception( "No relationship to JOIN from ${from_class} to ${to_class}" ) unless $rel_obj; my $join = $from_class->storage->sql_maker->_join_condition( - $from_class->result_source_instance->_resolve_condition( - $rel_obj->{cond}, $to, $from) ); + scalar $from_class->result_source_instance->_resolve_condition( + $rel_obj->{cond}, $to, $from + ) + ); return $join; } diff --git a/lib/DBIx/Class/ResultSource.pm b/lib/DBIx/Class/ResultSource.pm index d4e4683..9489f49 100644 --- a/lib/DBIx/Class/ResultSource.pm +++ b/lib/DBIx/Class/ResultSource.pm @@ -1510,7 +1510,7 @@ sub _resolve_join { -alias => $as, -relation_chain_depth => $seen->{-relation_chain_depth} || 0, }, - $self->_resolve_condition($rel_info->{cond}, $as, $alias, $join) + scalar $self->_resolve_condition($rel_info->{cond}, $as, $alias, $join) ]; } } diff --git a/t/lib/DBICTest/Schema/Track.pm b/t/lib/DBICTest/Schema/Track.pm index ee20014..e1e56b4 100644 --- a/t/lib/DBICTest/Schema/Track.pm +++ b/t/lib/DBICTest/Schema/Track.pm @@ -87,8 +87,8 @@ __PACKAGE__->has_many ( "$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 }, } ) }