This thread looks to be a little on the old side and therefore may no longer be relevant. Please see if there is a newer thread on the subject and ensure you're using the most recent build of any software if your question regards a particular product.
This thread has been locked and is no longer accepting new posts, if you have a question regarding this topic please email us at support@mindscape.co.nz
|
hi, i just want to confirm something. I have a parent entity and assoc child entities (1-many). At present the parent entity is set to soft delete. When I delete the parent entity the record obviously remains in the db but the child entities are all hard deleted. (Even though IsDependent is currently set to false - ??) I now want to also soft delete the child entities when the parent entity is soft deleted. It's not clear to me from the documentation whether I need to do anything specific to get this behavior, apart from changing the child entity to SoftDelete = true. ie, do I need to also set IsDependent=true on the assoc or not? So what I'm after is when a parent entity is (soft) deleted, also (soft) deleted all assoc child entities... thanks justin
|
|
|
i guess this might be relevant - from the docs: "re DependentAttribute. NB. This is normally inferred based on the nullability of the corresponding foreign key field"
|
|
|
If the child entities are marked as soft delete, then they will be soft deleted rather than hard deleted. You do not need to set IsDependent unless the association is nullable. Yes, you are correct that non-nullable associations are always dependent (i.e. cascade). |
|