I tried adding the SchemaFactory property to the persistence.xml but it did
not correct the statement order.  Any other ideas?


On Thu, Jun 20, 2013 at 2:59 AM, Jens Leisenberg [via OpenJPA] <
ml-node+s208410n7584221...@n2.nabble.com> wrote:

> Josh,
>
> did you tried to set the ShemaFactory property in your persistence.xml to
> 'native(ForeignKeys=true)'? This should reorder the statements.
>
>
> http://ci.apache.org/projects/openjpa/2.1.x/manual/ref_guide_schema_info.html#ref_guide_schema_info_factory
>
>
>
> From: "josh.wilson" <[hidden 
> email]<http://user/SendEmail.jtp?type=node&node=7584221&i=0>>
>
> To: [hidden email] <http://user/SendEmail.jtp?type=node&node=7584221&i=1>,
>
> 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
> 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)
>
>
>
>
>
>
>
> --
> View this message in context:
>
> http://openjpa.208410.n2.nabble.com/OneToMany-Delete-Order-Problem-tp7584211.html
>
> Sent from the OpenJPA Users mailing list archive at Nabble.com.
>
>
>
>
>
> ------------------------------
>  If you reply to this email, your message will be added to the discussion
> below:
>
> http://openjpa.208410.n2.nabble.com/OneToMany-Delete-Order-Problem-tp7584211p7584221.html
>  To unsubscribe from OneToMany Delete Order Problem, click 
> here<http://openjpa.208410.n2.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=7584211&code=am9zaC53aWxzb25AaW5zcGlyZWRieXRlLmNvbXw3NTg0MjExfDk4NjE4NjU2Mw==>
> .
> NAML<http://openjpa.208410.n2.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>




--
View this message in context: 
http://openjpa.208410.n2.nabble.com/OneToMany-Delete-Order-Problem-tp7584211p7584249.html
Sent from the OpenJPA Users mailing list archive at Nabble.com.

Reply via email to