Bug #9684

Datamapper fails to thaw reused objects if in certain order

Added by Robert Lemke about 9 years ago. Updated almost 9 years ago.

Status:
Resolved
Priority:
Should have
Category:
Persistence
Start date:
2010-09-10
Due date:
% Done:

100%

PHP Version:
Has patch:
Complexity:

Description

Consider the following properties of an entity:

    /**
     * Paths of this workspace, indexed by nodes
     *
     * @var \SplObjectStorage
     */
    protected $nodesAndPaths;

    /**
     * Nodes of this workspace, indexed by their absolute path
     *
     * @var array<\F3\TYPO3CR\Domain\Model\Node>
     */
    protected $pathsAndNodes = array();

If I put a Node object into both containers at the same time, it works if the properties are defined in the above order but it does not if they are defined the other way around.

Associated revisions

Revision 672626bb (diff)
Added by Karsten Dambekalns about 9 years ago

[+BUGFIX] FLOW3 (Persistence): Make property thawing order independent

Thawing of objects could fail if the same object was referenced inside
two properties of an object but the order in which these were returned
from the persistence backend differed from the order in the classschema.

Change-Id: I5bd71c9ad4a4dd847dda7b229f206a55b580c04b
Fixes: #9684

Revision 84e29678 (diff)
Added by Robert Lemke about 9 years ago

[+BUGFIX] FLOW3 (Persistence): Make property thawing order independent

Thawing of objects could fail if the same object was referenced inside
two properties of an object but the order in which these were returned
from the persistence backend differed from the order in the classschema.

The last fix introduced in Change I5bd71c9a contained a bug: properties
of type object which originally contained NULL, contained an empty array
after thawing. This patch should fix that problem.

Change-Id: I6b4635081f00d90b95ecef0555265803ce7c92c8
Fixes: #9684

History

#1 Updated by Robert Lemke about 9 years ago

  • Status changed from Accepted to Under Review

#2 Updated by Karsten Dambekalns about 9 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100

Also available in: Atom PDF