From: Jason M. Mills Date: Fri, 20 Feb 2009 03:27:41 +0000 (+0000) Subject: Modfied isa() check in set_from_related() to use class name returned from relationshi... X-Git-Tag: v0.08240~102 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=e76db9c6078ffe90873ea9641774d448b555fa7e;p=dbsrgits%2FDBIx-Class.git Modfied isa() check in set_from_related() to use class name returned from relationship_info() rather than class() accessor on object. This fixes an issue when using with Catalyst::Model::DBIC::Schema. --- diff --git a/lib/DBIx/Class/Relationship/Base.pm b/lib/DBIx/Class/Relationship/Base.pm index f78bb6b..9e4a35a 100644 --- a/lib/DBIx/Class/Relationship/Base.pm +++ b/lib/DBIx/Class/Relationship/Base.pm @@ -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); }