[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[TYPO3-english] LazyObjectStorage and Persistence



Hi,

I am currently implementing a web application using Typo3 and Extbase. The application 
uses a complex object model (about 10 object types), all objects are logical descendants 
of a root object, which I have therefore marked as "aggregate root" in the 
Extension Builder and initiate all persistence updates using the corresponding root 
object.

Simplified example:

Object A <-- 1:n --> Object B <-- 1:n --> Object C

To access the corresponding parent objects i extended the object models of B 
and C to include the link to A (or B), which was trivial in case of 
1:n-relations since the DB already included the parent as a field. When 
changing values in B and C I update the Object Storage of A using the parent A 
object.

This worked quite well, the application slowed down considerably though, when 
the object count increased. I solved this by marking some relations as @lazy 
and thus converting their object storages to LazyObjectStorage.

The problem with this is, that updating the parent object object now dowsn't 
persist the child objects any more. This seems to be connected to the 
LazyObjectStorages not replacing themselves with the real objects in time...if 
I var_dump() the object before persisting using the DebuggerUtils persisting 
works fine.

My question would be: Is there a way to force an object to load all of it's 
lazy object storages? Or should I go about this in a completely different 
manner?

Thanks!
_______________________________________________
TYPO3-english mailing list
[email protected]
http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-english