Can't persist symfony collection with double embedded form
问题 I receive the following error when trying to submit my form : An exception occurred while executing 'INSERT INTO UserIngredientSupplier (quantity, cost, createdAt, updatedAt, unitId, organizationId, userIngredientId) VALUES (?, ?, ?, ?, ?, ?, ?)' with params [1000, 4.5, "2014-11-27 22:46:51", "2014-11-27 22:46:51", 4, 2, null]: SQLSTATE[23000]: Integrity constraint violation: 1048 Le champ 'userIngredientId' ne peut être vide (null) I did not forget to put 'by_reference' => false , I did not