From helmut.hummel at typo3.org Mon Nov 14 18:30:46 2011 From: helmut.hummel at typo3.org (Helmut Hummel) Date: Mon, 14 Nov 2011 18:30:46 +0100 Subject: [TYPO3-50-general] Relations of created sub-properties Message-ID: 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. 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: From helmut.hummel at typo3.org Mon Nov 14 18:48:53 2011 From: helmut.hummel at typo3.org (Helmut Hummel) Date: Mon, 14 Nov 2011 18:48:53 +0100 Subject: [TYPO3-50-general] Relations of created sub-properties In-Reply-To: References: Message-ID: Hi, Helmut Hummel wrote: > I attached the code I have. What am I missing? 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. Kind regards, Helmut -- Helmut Hummel TYPO3 Security Team Leader, TYPO3 v4 Core Team Member TYPO3 .... inspiring people to share! Get involved: typo3.org From helmut.hummel at typo3.org Tue Nov 15 01:34:36 2011 From: helmut.hummel at typo3.org (Helmut Hummel) Date: Tue, 15 Nov 2011 01:34:36 +0100 Subject: [TYPO3-50-general] Relations of created sub-properties In-Reply-To: References: Message-ID: On 14.11.11 18:30, Helmut Hummel wrote: > 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. > > I attached the code I have. What am I missing? > > Kind regards, > Helmut > Oops, wrong list, sorry Kind regards, Helmut -- Helmut Hummel TYPO3 Security Team Leader, TYPO3 v4 Core Team Member TYPO3 .... inspiring people to share! Get involved: typo3.org