Closed
Description
Essentially the issue outlined here: http://stackoverflow.com/questions/8748785/symfony2-collection-form-does-not-fill-join-column
Expected outcome:
When adding new collection items using a collection form field, the owner of the collection items is set.
Actual outcome:
The owner of the collection items is not set.
Steps to reproduce:
- Create two entities with a one-to-many association (i.e. Office(id) ----< Contact(id)) - enable cascading persists on office.contact.
- Create form types for the two entities, setting office.contact as a collection form field and the necessary actions & template.
- Add a Contact using the form and save it in the action.
- The resulting Contact will have a NULL office_id.
The workaround is to manually iterate over office.contacts and set the office on them.
Metadata
Metadata
Assignees
Labels
No labels