Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EclipseLink » ManyToMany relation DELETE
ManyToMany relation DELETE [message #724754] Tue, 13 September 2011 00:52 Go to previous message
AmFreak Missing name is currently offline AmFreak Missing name
Messages: 25
Registered: June 2011
Junior Member
Hi,

i have 2 tables with a ManyToMany relationship. Projects and Persons. I have 2 lists, one with projects and one with persons. In one list are all the persons from the person table in the other all the projects from the project table. Each Project has a list with all persons in it and each person a list with all projects that person is in. If i now delete a person the person gets deleted from the person table and from the "person_in_project" table in my database. The problem i have is that if i now re-read the tables:

Query query = em.createQuery("select p from Project p");
		projects = query.getResultList();

		Query query = em.createQuery("select p from Person p");
		 persons = query.getResultList();


the person that was deleted (and so doesn't exist anymore) is still in it's projects.
I found out that this doesn't happen if i disable the shared cache, but this can't be the answer. So what to do Confused
 
Read Message
Read Message
Read Message
Read Message
Previous Topic:Eclipse link and db description in xml
Next Topic:error during startup
Goto Forum:
  


Current Time: Tue May 21 00:56:21 EDT 2013

Powered by FUDForum. Page generated in 0.01711 seconds