From: Peter Rabbitson Date: Fri, 26 Apr 2013 11:57:38 +0000 (+0200) Subject: Do not invoke the pk accessor in filter deflate X-Git-Tag: v0.08250~4 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=090c2209999171147d12e33aea52237e9e2fae83;p=dbsrgits%2FDBIx-Class.git Do not invoke the pk accessor in filter deflate --- 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; } } );