Hi folks,
I always have this kind problem with Symfony : Let's say you have a product, and you want to add it some photos. I guess like this there's no problem :
Product:
columns:
name: { type: string(255), notnull: true, unique: true }
Photo:
columns:
product_id: { type: integer, notnull: true }
name: { type: string(255) }
order: { type: integer, notnull: true }
relations:
Product: { onDelete: CASCADE, local: product_id, foreign: id, foreignAlias: Photos }
But the thing is i want my the user to add the photos directly when he adds/edits a product. It sounds quite basic, I promise I spent hours looking for the answer before asking you ! Of course the best would be to do this with some ajax to add all the files in a row, but if he could do it submiting several times it would all ready be better (usually I did this with a separate "photo" form, in which you had to search the product every time to link it...
So the problem is "embedding" or "nesting" (i don't know the exact word) the foreign objects in the form.
Thank's