Hello rdHatch,
Thanks for the info. I'm not sure that will apply because we almost use everywhere cascade delete.
Just as info, I do not use unit of work actually. I use plain transaction because I want action to be executed in the exact order I program them in code.
Just as more info...
Note: "relation entity" is the entity where reside the relation between 2 entites in a relation m:n.
The problem I have is part of a silly behavior I have to do to meet my customer requirements...
I have to re-do relations on 2 entities in a relation m-n.
I delete each relations between the 2 entitites then I reconstruct relations accordingly to the new states of both entities. The problem seems that delete never occurs in first step althought I put my relation entity in the transaction and delete it. Relation entities stay there and at the final result I have the relation defined twice.
I made 2 things:
- ensure to never have 2 times the same relation by adding an integrity constrain.
- adding more code to not trying to delete the relation entity if I should reconstruct it
The other thing I didn't verify (and I should do) is that probably that I never delete any relation entity and have non coherent database (too much relations between objects).
Thanks for your support.