Bug #60544

Pid property not set after insert

Added by Mathias Brodala almost 7 years ago. Updated over 2 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Extbase
Target version:
-
Start date:
2014-07-24
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
6.2
PHP Version:
Tags:
Complexity:
easy
Is Regression:
No
Sprint Focus:

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.


Related issues

Related to TYPO3 Core - Bug #65364: _languageUid gets overwritten on updating a new domain object.Closed2015-02-26

Actions
#1

Updated by Gerrit Code Review over 6 years ago

  • 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

#2

Updated by Anja Leichsenring over 6 years ago

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.

#3

Updated by Alexander Opitz over 6 years ago

  • 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.

#4

Updated by Mathias Brodala over 6 years ago

Please leave me some time to verify this.

#5

Updated by Mathias Brodala over 6 years ago

Please reopen this, the steps mentioned by Anja do not work.

#6

Updated by Gerrit Code Review over 6 years ago

  • 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

#7

Updated by Gerrit Code Review over 6 years ago

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

#8

Updated by Anja Leichsenring over 6 years ago

  • Sprint Focus set to On Location Sprint
#9

Updated by Mathias Brodala over 6 years ago

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

Updated by Anja Leichsenring over 5 years ago

  • Sprint Focus deleted (On Location Sprint)
#11

Updated by Benni Mack over 2 years ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF