Are your UserImpl and/or AccountCategoryImpl objects used by more than one AccountImpl? It looks like they're supposed to be, but your mapping has been told to delete those objects when any object referring to them is deleted. So when you delete an AccountImpl, its AccountCategoryImpl is being deleted, but that's failing because other AccountImpls still refer to it.
Change your cascade level to something appropriate. Given that Users and Categories are conceptually permanent objects, they should probably be managed on their own, not via many-to-ones like you're donig. Change the cascade to "none", or at best "save-update".
P.S. Appropriate use of code tags makes mapping docs much more readable.
P.P.S. Why would the hibernate team look into a simple bug like this? That's what we plebians who actually make a profit from their hard work are for. They've already made their contribution to the open source community.
|