Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EclipseLink » ManyToMany: Why is no exception thrown?
ManyToMany: Why is no exception thrown? [message #379033] Mon, 11 August 2008 05:57 Go to previous message
Christian Reiter is currently offline Christian Reiter
Messages: 4
Registered: July 2009
Junior Member
Hi!

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
CITY_PERSON.

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
it.

Best regards,
christian
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic:OSGI troubles with createEntityManagerFactory
Next Topic:ManyToOne in Embeddable
Goto Forum:
  


Current Time: Sat May 18 21:52:55 EDT 2013

Powered by FUDForum. Page generated in 0.07301 seconds