[FLOW3-general] Adding multiple objects with a OneToMany relation
Mario Beiser
mariobeiser at googlemail.com
Sun Dec 2 18:48:33 CET 2012
Dear list,
any suggestions on how I can add multiple objects via checkboxes facing a
OneToMany-Relation?
I got a list and want to add different items while saving the list.
In the item model I declared the $list
as @ORM\ManyToOne(inversedBy="settings")
and in the list model I set the $items as @ORM\OneToMany(mappedBy="list").
By saving the object I receive the following error:
*Exception while property mapping for target type
"My\Package\Domain\Model\list", at property path "items": It is not allowed
to map property "__identity". *
I send my items in a list of checkboxes:
<f:for each="{items}" as="item">
<f:form.checkbox property="items" value="{item}" />
</f:for>
Do I have to pack them in array and add them manually in my controller?
I remember some strange behaviour of checkboxes in Extbase...
Any suggestions?
mabe
More information about the FLOW3-general
mailing list