How is this expected to work when having a bi-directional relation? If you only delete the orphan you will trigger the foreign key constraint.

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