[TYPO3-mvc] RFC #8244: Changes made to a domain object sitting at a "dirty" property won't get persisted

Franz Koch typo3.RemoveForMessage at elements-net.de
Fri Jun 18 02:15:16 CEST 2010


On 18.06.2010 00:48, Franz Koch wrote:
>> If that's not an issue, +1 on reading.
>
> also +1 on testing. In my case new objects assigned to properties didn't
> get stored at all without the patch.

sorry, after further testing -1. I'm running in endless recursions with 
this patch.

My scenario:
I have objects, that can have relations to each other. In my case it's a 
"company" object. Those companys have types (headquarters and 
subsidiary). Subsidiaries themselves have a relation (property 
RELATION_HAS_ONE) to their headquarters company (no company is relating 
to itself though).

Now if both objects change (due to updates) and get persisted, I'm 
running into a endless recursion (don't know why exactly, but it happens).
My temporary fix is a new ObjectStorage inside the PersistenceBackend 
that's holding references to already persisted objects and only 
processes object properties with instance of 
Tx_Extbase_DomainObject_DomainObjectInterface if they haven't been 
persisted already. Not sure if this might have any side effects 
(releasing objects form memory f.e.). So maybe a different solution 
might be better (check for _isNew() and _isDirty() before persisting, 
but a quick try didn't work out);

-- 
kind regards,
Franz Koch


More information about the TYPO3-project-typo3v4mvc mailing list