[FLOW3-general] Relations of created sub-properties
Helmut Hummel
helmut.hummel at typo3.org
Tue Nov 15 01:36:08 CET 2011
Dear FLOW3 experts,
I have a simple many to one relation with two objects, one of them being
the aggregate root. When I now have a form to create the aggregate root
object with one association, both objects are created, but the relation
is lost. In my case the "Artist" is not associated to the concert.
Of course I can add
foreach ($newConcert->getArtists() as $artist) {
$artist->setConcert($newConcert);
}
to the createAction. But it seems a bit odd to me that this is necessary.
I attached the code I have. What am I missing?
Kind regards,
Helmut
--
Helmut Hummel
TYPO3 Security Team Leader, TYPO3 v4 Core Team Member
TYPO3 .... inspiring people to share!
Get involved: typo3.org
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: sample-code.txt
URL: <http://lists.typo3.org/pipermail/flow3-general/attachments/20111115/bc5d9196/attachment.txt>
More information about the FLOW3-general
mailing list