Originally, I was going to change Cascade#cascadeProperty to attempt orphan removal when either child is null or the loadedValue != child (this case). However, the UK violation still occurs due to ActionQueue#executeActions executing inserts/updates before deletions. And it has to stay that way – deleting before updating can cause FK violations.
And, manually flushing (the delete, in this case) from within a cascade is a very bad idea.
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
Originally, I was going to change Cascade#cascadeProperty to attempt orphan removal when either child is null or the loadedValue != child (this case). However, the UK violation still occurs due to ActionQueue#executeActions executing inserts/updates before deletions. And it has to stay that way – deleting before updating can cause FK violations.
And, manually flushing (the delete, in this case) from within a cascade is a very bad idea.
Steve Ebersole, what's your opinion?