openjpa-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Pinaki Poddar <>
Subject Re: Inconsistent execution order of INSERT statements using cascading persist
Date Thu, 07 Aug 2008 17:57:36 GMT

> Would using the OpenJPA "ForeignKey" annotation be a sufficient work
> around for not being able to use the native schema factory?

Good idea. Should work as well as this annotation tells OpenJPA that a
'logical' foreign key exists.
Have not tried/tested though. Let us know if this solves your problem.

> Also, if I use the operation-order update manager, would I need to
> explicitly insert the parent entity and child entities separately, or
> would the cascading persist work in that manner?

The cascade will insert parent first and child later if Parent.children is
annotated with CascadeType.PERSIST/ALL. The cascading scheme and sql
ordering strategy are not aware of each other but in this case they will be

View this message in context:
Sent from the OpenJPA Users mailing list archive at

View raw message