openjpa-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jens Leisenberg <>
Subject Re: OneToMany Delete Order Problem
Date Thu, 20 Jun 2013 07:58:30 GMT

did you tried to set the ShemaFactory property in your persistence.xml to
'native(ForeignKeys=true)'? This should reorder the statements.

From:	"josh.wilson" <>
Date:	06/18/2013 07:19 PM
Subject:	OneToMany Delete Order Problem

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,
= true)
@JoinColumn(name = "ID_XXX", referencedColumnName = "ID_XXX", nullable =

View this message in context:

Sent from the OpenJPA Users mailing list archive at

View raw message