Java Mailing List Archive

Home » users.openjpa »

OneToMany Delete Order Problem



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

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 =

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