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

Stefan Isak stefanisak at googlemail.com
Mon Jan 3 12:02:21 CET 2011


Hey Sebastian,

thanks for your hint, even if I'm not sure if it's really a workaround.

Using eval = unique won't prevent TYPO3 from creating the record. What actually happens is, that TYPO3 increments values.
E.g. saving twice an object having just one property with a value 'work' creates two records 'work' and 'work0'.

Does that mean there is no way right now to handle this and I can't properly use the TYPO3 backend for editing purposes whenever my domain design contains value objects?

Greetings
Stefan



On 03.01.2011, at 10:28, Sebastian Fischer wrote:

> 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
> _______________________________________________
> TYPO3-project-typo3v4mvc mailing list
> TYPO3-project-typo3v4mvc at lists.typo3.org
> http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-project-typo3v4mvc



More information about the TYPO3-project-typo3v4mvc mailing list