X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FDBIx%2FClass%2FRelationship%2FAccessor.pm;h=4d889cc771a4d1c02e13e32c373a822258172383;hb=090c2209999171147d12e33aea52237e9e2fae83;hp=fb95c35b057c230f7c5cdaab3e6c0e3df3dfdc50;hpb=bdb4d9404c947de09d19c6af830518b5c9801094;p=dbsrgits%2FDBIx-Class.git diff --git a/lib/DBIx/Class/Relationship/Accessor.pm b/lib/DBIx/Class/Relationship/Accessor.pm index fb95c35..4d889cc 100644 --- a/lib/DBIx/Class/Relationship/Accessor.pm +++ b/lib/DBIx/Class/Relationship/Accessor.pm @@ -69,13 +69,13 @@ sub add_relationship_accessor { "Relationship '$rel' of type 'filter' can not work with a multicolumn primary key on source '$f_class'" ) if @rest; - my $v = $val->$pk_col; + my $pk_val = $val->get_column($pk_col); carp_unique ( "Unable to deflate 'filter'-type relationship '$rel' (related object " . "primary key not retrieved), assuming undef instead" - ) if ( ! defined $v and $val->in_storage ); + ) if ( ! defined $pk_val and $val->in_storage ); - return $v; + return $pk_val; } } );