[TYPO3-mvc] TYPO3 backend is irrespective of value objects?

Sebastian Fischer sf at marketing-factory.de
Mon Jan 3 10:28:48 CET 2011


On 29.12.2010 22:26, Stefan Isak wrote:
> Sorry, I didn't make myself clear.
>
> For example, one can add and persist value objects writing something like:
>     $this->repository->add($valueObject);
>     $this->repository->add($valueObject);
>     $persistenceManager->persistAll();
>
> That usually causes an invocation of methods like getUidOfAlreadyPersistedValueObject() to check if there's already a persisted object equal to the given one.
> If I create new value objects in the backend, those methods won't get invoked and I always get new objects.
>
> So is this a missing feature?
>
> Stefan

The backend doesnt use any extbase methods at all outside of extbase 
based modules. So if you use the list modul to create new value object 
they are created even if the value already exists.

To prevent this, you could use the tca config eval = unique or eval = 
uniqueInPid. With this the record is only saved if the value is not 
present either global or in the current storage folder.

Thats not an extbase issue but a general behaviour of TYPO3.

Greetings
Sebastian


More information about the TYPO3-project-typo3v4mvc mailing list