Bug #60544
closed
Pid property not set after insert
Added by Mathias Brodala over 10 years ago.
Updated about 6 years ago.
Description
After adding and persisting a new object, its uid
property is set pointing to the newly created database entry.
However, the pid
property should be set likewise so that the caller can get to know where the object ended up being stored.
Without this, one has to basically reproduce the determineStoragePageIdForNewRecord
method to find out what PID the backend used in the end.
- Status changed from New to Under Review
Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/35474
You can do a
$repo->add(object)
what initiates the insert. Then $persistenceManager->persistAll()
launches the real insert (or any other databased/persistence related) action. After this, $object->getPid()
contains the pid. You have to ask the repo anyway, when you want to do more stuff with the object after insertion, so this will not help you.
- Status changed from Under Review to Rejected
- Target version deleted (
next-patchlevel)
As explained by Anja Leichsenring, I close this one as rejected.
If you need more help on this please ask on Forum/Mailinglist.
Please leave me some time to verify this.
Please reopen this, the steps mentioned by Anja do not work.
- Status changed from Rejected to Under Review
Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/35474
Patch set 1 for branch TYPO3_6-2 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/36423
- Sprint Focus set to On Location Sprint
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
- Sprint Focus deleted (
On Location Sprint)
- Status changed from Resolved to Closed
Also available in: Atom
PDF