Changeset 2453

Show
Ignore:
Timestamp:
05/28/08 08:05:44 (21 months ago)
Author:
fumiakiy
Message:

Changed the way to generate unique hash key for an object. BugId:79927

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • branches/release-39/lib/MT/Object.pm

    r2421 r2453  
    12061206        $r->cache('object_cache', $oc); 
    12071207    } 
    1208     $oc = $oc->{"$obj"} ||= {}; 
     1208 
     1209    my $pk = $obj->primary_key; 
     1210    $pk = join ":", @$pk if ref $pk; 
     1211    $oc = $oc->{ref($obj). ':' . $pk} ||= {}; 
     1212 
    12091213    if (@_) { 
    12101214        $oc->{$key} = $_[0];