Commit 7d3d0e28 authored by Igor Uzlov's avatar Igor Uzlov Committed by Jordan Karlov
Browse files

Issue #3133047 by uzlov: The cache of first entity in table is broken

parent 87e12925
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -1084,6 +1084,7 @@ class Table extends ViewsTable {

    // Check, if the field is in _entity (base table).
    if (isset($row->_entity->{$field_name})) {
      $row->_entity = clone $row->_entity;
      $field = $row->_entity->{$field_name};
    }

@@ -1092,6 +1093,7 @@ class Table extends ViewsTable {
      $relationship_entity = array_keys($row->_relationship_entities);
      foreach ($relationship_entity as $key => $rel) {
        if (isset($row->_relationship_entities[$rel]->{$field_name})) {
          $row->_relationship_entities[$rel] = clone $row->_relationship_entities[$rel];
          $field = $row->_relationship_entities[$rel]->{$field_name};
        }
      }