X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FDBIx%2FClass%2FRelationship%2FBase.pm;h=23df27e17ee46925cabc0d488948587f74b48762;hb=47752afea0272e7382c9649086ae63652b94a2fa;hp=f78bb6b4a3fbc25441658b7347609e47b7280b25;hpb=684af87666cd89229fd16c750cf1f77790e76a39;p=dbsrgits%2FDBIx-Class.git diff --git a/lib/DBIx/Class/Relationship/Base.pm b/lib/DBIx/Class/Relationship/Base.pm index f78bb6b..23df27e 100644 --- a/lib/DBIx/Class/Relationship/Base.pm +++ b/lib/DBIx/Class/Relationship/Base.pm @@ -209,7 +209,7 @@ sub related_resultset { if (ref $_ eq 'HASH') { my $hash; foreach my $key (keys %$_) { - my $newkey = $key =~ /\./ ? "me.$key" : $key; + my $newkey = $key !~ /\./ ? "me.$key" : $key; $hash->{$newkey} = $_->{$key}; } $hash; @@ -399,7 +399,7 @@ sub set_from_related { (ref $cond ? ref $cond : 'plain scalar') ) unless ref $cond eq 'HASH'; if (defined $f_obj) { - my $f_class = $self->result_source->schema->class($rel_obj->{class}); + my $f_class = $rel_obj->{class}; $self->throw_exception( "Object $f_obj isn't a ".$f_class ) unless Scalar::Util::blessed($f_obj) and $f_obj->isa($f_class); }