Bug #29979

PersistenceManager::getIdentifierByObject() only returns first Id property

Added by Bastian Waidelich almost 4 years ago. Updated about 1 year ago.

Status:Closed Start date:2011-09-18
Priority:Should have Due date:
Assigned To:- % Done:

0%

Category:Persistence
Target version:-
PHP Version: Complexity:
Has patch:No Affected Flow version:FLOW3 1.0.0

Description

The doc comment for \TYPO3\FLOW3\Persistence\PersistenceManagerInterface::getIdentifierByObject() says, that the return type is "mixed".
Usually that is the UUID of the object (string).
If the object has an @Id property, that will be returned insted.
In case the object has multiple @Id properties, only the first of those is returned.

Example:
Mode:

class ObjectPathMapping {

    /**
     * @var string
     * @Id
     */
    protected $objectType;

    /**
     * @var string
     * @Id
     */
    protected $uriPattern;

    /**
     * @var string
     * @Id
     */
    protected $pathSegment;
[...]
}

Now, only the value of $objectType would be returned. Instead I'd expect an array that contains the Id properties - or a serialized representation!?

History

#1 Updated by Bastian Waidelich almost 4 years ago

BTW: It would make our life easier, if the return type would be fixed (e.g. string)

#2 Updated by Karsten Dambekalns almost 4 years ago

  • Affected Flow version set to FLOW3 1.0.0

#3 Updated by Gerrit Code Review over 3 years ago

  • Status changed from New to Under Review

Patch set 1 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/9650

#4 Updated by Robert Lemke about 3 years ago

  • Status changed from Under Review to Needs Feedback
  • Has patch set to No

#5 Updated by Bastian Waidelich about 1 year ago

  • Status changed from Needs Feedback to Closed

The related review has been abandoned. Closing until this has a valid use case

Also available in: Atom PDF