Fix all invocations of _resolve_condition to match the new signature
Peter Rabbitson [Thu, 16 Jun 2011 08:22:27 +0000 (10:22 +0200)]
lib/DBIx/Class/CDBICompat/ImaDBI.pm
lib/DBIx/Class/ResultSource.pm
t/lib/DBICTest/Schema/Track.pm

index 15a125d..85aced2 100644 (file)
@@ -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;
       }
 
index d4e4683..9489f49 100644 (file)
@@ -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)
           ];
   }
 }
index ee20014..e1e56b4 100644 (file)
@@ -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 },
       }
     )
   }