Bug #29979

PersistenceManager::getIdentifierByObject() only returns first Id property

Added by Bastian Waidelich almost 10 years ago. Updated about 7 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Persistence
Target version:
-
Start date:
2011-09-18
Due date:
% Done:

0%

Estimated time:
PHP Version:
Has patch:
No
Complexity:

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!?

#1

Updated by Bastian Waidelich almost 10 years ago

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

#3

Updated by Gerrit Code Review over 9 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 9 years ago

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

Updated by Bastian Waidelich about 7 years 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