X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FDBIx%2FClass%2FResultSource.pm;h=ce88cbb898a75a2fdb30908ebc2add8313dfe78a;hb=5592d633;hp=fb4c27d2cf6bc57cb9fbdfd660c34fa0d09df1eb;hpb=9a94cf9318433056df45629190a8ae433a5a9722;p=dbsrgits%2FDBIx-Class.git diff --git a/lib/DBIx/Class/ResultSource.pm b/lib/DBIx/Class/ResultSource.pm index fb4c27d..ce88cbb 100644 --- a/lib/DBIx/Class/ResultSource.pm +++ b/lib/DBIx/Class/ResultSource.pm @@ -1704,11 +1704,10 @@ sub _resolve_condition { else { $res_args[$_] ||= {}; + # hate everywhere - have to pass in as a plain hash + # pretending to be an object at least for now $self->throw_exception("Unsupported object-like structure encountered: $res_args[$_]") unless ref $res_args[$_] eq 'HASH'; - - # hate everywhere - $res_args[$_] = $self->relationship_info($rel_name)->{source}->result_class->new($res_args[$_]); } } @@ -1881,7 +1880,16 @@ sub _resolve_relationship_condition { ; for my $i (0..$#$obj_cols) { - if (defined $args->{self_resultobj} and ! $obj->has_column_loaded($obj_cols->[$i])) { + + # FIXME - temp shim + if (! blessed $obj) { + $cond->{"$plain_alias.$plain_cols->[$i]"} = $obj->{$obj_cols->[$i]}; + } + elsif ( + defined $args->{self_resultobj} + and + ! $obj->has_column_loaded($obj_cols->[$i]) + ) { $self->throw_exception(sprintf "Unable to resolve relationship '%s' from object '%s': column '%s' not "