I am trying to insert into a database a set number of instances of an entity from a single form submit.
Lets say for example I have an entity called "Assignement" which assigns an employee to a department.
Supposedly I select 3 different employees to assign at the same time to 3 different departments. I thus want my sql transaction to insert 9 times the said "Assignement" instance in my database with different user and departement values each time.
I am using Symfony 2 as a framework and Doctrine as an ORM.
I've done some research and I tried fiddling with the controller and the doctrine query builder but no results so far.
Does anyone have an idea on how to engage the issue? Any lead I could follow?