I have an Entity called Audit with a member called Materials which is a collection of Material Entities:
In Material I have:
The table that is created is:
This what I would expect. However the issue I have is I can't delete an Audit without getting a 'Cannot delete or update a parent row: a foreign key constraint fails' exception on this table.
I have been reading through the Annotations reference guide and I am still not sure how to map this so I can delete Audits and have the Materials persist but the material_audit mappings removed. Its actually not even important for me to ever list all the Audits for a material, (I only want to show an Audit and its associated Materials) so I may not need the Audits member in Materials (if that helps at all).
Any tips would be great.
Whoever got anywhere by being normal? Just ask this exceptional tiny ad:
Devious Experiments for a Truly Passive Greenhouse!