[BUGFIX] Repository replace() does not replace unpersisted objects
authorClaus Due <claus@wildside.dk>
Wed, 7 Dec 2011 17:50:23 +0000 (18:50 +0100)
committerJochen Rau <jochen.rau@typoplanet.de>
Fri, 3 Feb 2012 17:12:50 +0000 (12:12 -0500)
commit4ef34a7dfa6ec7979ed08a303792e9318d762751
treebb50c7fd206f16898fb6155cf0821a83a13f8bfe
parenta151fa4c6e41c73d944687434b209d66b3769fd3
[BUGFIX] Repository replace() does not replace unpersisted objects

This adds an additional case to check $this->addedObjects even if
$existingObject has an UID. Without this, adding, persisting and
replacing an object in the same controller action would cause the
replace() command to have no effect.

Thanks to Balisky Christophe for reporting.

Change-Id: Id297b1d5ae261a88aad485b718ea1a3e8be76f3e
Fixes: #7571
typo3/sysext/extbase/Classes/Persistence/Repository.php