Delete record that is related to another
Closed this issue · 0 comments
bzashev commented
If I try to delete a record that is:
- one to many relation -> we should check if the related field on the other entity is required, If so the deletion should fail until there is related records. If the related field is not required it should not fail, but update with NULL all other entity's records that have the related field value of the deleted record.
- many to many relation -> we should be able to delete records and delete also the record in the auxiliary table. There is no way to enforce required relation here.