[
https://issues.apache.org/jira/browse/OPENJPA-435?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12540672
]
Prashant Bhat commented on OPENJPA-435:
---------------------------------------
I'm using the first option for mapping tool and also during
entityManagerFactory creation:
<property name="openjpa.jdbc.MappingDefaults"
value="ForeignKeyDeleteAction=restrict,
JoinForeignKeyDeleteAction=restrict"/>
And for me it's working perfectly with all constraints and I agree that
changing the default behaviour to this makes it a lot easier for beginners(as I
had the same issue and the manual was not very clear for me then! May be it's
updated now)
Regards,
Prashant
> Change mapping defaults to assume foreign keys exist for relationships by
> default
> ---------------------------------------------------------------------------------
>
> Key: OPENJPA-435
> URL: https://issues.apache.org/jira/browse/OPENJPA-435
> Project: OpenJPA
> Issue Type: Improvement
> Components: sql
> Affects Versions: 0.9.0, 0.9.6, 0.9.7, 1.0.0, 1.0.1, 1.0.2, 1.1.0
> Reporter: Patrick Linskey
> Fix For: 1.1.0
>
>
> OpenJPA's current defaults assume that no foreign keys exist. This leads to
> potentially more optimal SQL ordering, but often also leads to FK constraint
> violations when obvious FKs exist but are not declared. We should change this
> default to be more user-friendly, and add a note to our optimization guide as
> appropriate if there are actions users should take to optimize.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.