Java Mailing List Archive

http://www.gg3721.com/

Home » users.openjpa »

OneToMany Delete Order Problem

josh.wilson

2013-06-18

Replies: Find Java Web Hosting

Author LoginPost Reply
I have a unidirectional one to many relationship defined but I am getting a
foreign key constraint violation when attempting to run a delete on the
entity. It appears the delete statements are not being issued in the
correct order. The entity record is being deleted before the records with
the foreign key references.

Is there any way to get them ordered properly? Configuration details
follow..

OpenJPA 2.2.1-SNAPSHOT (Websphere Version)

Annotations on entity field

@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.EAGER, orphanRemoval
= true)
@JoinColumn(name = "ID_XXX", referencedColumnName = "ID_XXX", nullable =
false)







--
Sent from the OpenJPA Users mailing list archive at Nabble.com.
©2008 gg3721.com - Jax Systems, LLC, U.S.A.