[TYPO3-mvc] extbase update a root object updates foreign child objects
Claus Due
claus at wildside.dk
Fri Sep 9 15:28:02 CEST 2011
hi Matthias,
If you use 1:n relations then the child objects are moved (field value on child record pointing to parent record uid gets overwritten). With a m:n relation what you describe should work (mm-table is updated with new relations and existing references from/to other parent objects are preserved).
Cheers,
Claus
On Sep 9, 2011, at 2:25 PM, Matthias Schubert wrote:
> Hello,
>
> I have an issue concerning extbase and the update() method.
>
> I got an existing root object which already was in the repository with no child objects. What I do is adding many child objects to the transient root object und persist it to the repository with update($root).
>
> What now happens is, that older child objects from other root objects are updated and so deleted for the other root. Why is this happening? Is there a failure in the model? How can I avoid this?
>
> I will be very thankfull for any suggenstions.
>
> Regards,
>
> Matthias
>
>
> _______________________________________________
> 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