|ManyToMany: Why is no exception thrown? [message #379033]
||Mon, 11 August 2008 09:57
| Christian Reiter
Registered: July 2009
I've defined two Entity Objects named Person and City. They have a
ManyToMany JPA relationship.
The relationship is established through a relation table in the DB named
My Problem is that when i try to remove a City which is "in
use"/referenced by some Person i do not get an exception, instead the City
as well as the row in CITY_PERSON gets deleted without a warning.
When i try to remove a Person i do get a RollbackException as expected and
the Person is not removed.
Why do i not get an exception when removing a used/referenced City?
Is there any way to check if any entity has references prior to removing
Powered by FUDForum
. Page generated in 0.01882 seconds