mirror of
https://github.com/apache/openjpa.git
synced 2025-02-22 18:32:06 +00:00
OPENJPA-1986: Update migration consideration docs and Compatibility javadoc.
git-svn-id: https://svn.apache.org/repos/asf/openjpa/trunk@1202800 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
b66ea198ae
commit
f81908f3ac
@ -558,7 +558,7 @@ public class Compatibility {
|
|||||||
* only applies for the case where we are trying to cascade a persist to an Entity which doesn't have a StateManager
|
* only applies for the case where we are trying to cascade a persist to an Entity which doesn't have a StateManager
|
||||||
* and we can't determine if it is detached.
|
* and we can't determine if it is detached.
|
||||||
*
|
*
|
||||||
* @since 2.1.x
|
* @since 2.1.1
|
||||||
*/
|
*/
|
||||||
public boolean getCheckDatabaseForCascadePersistToDetachedEntity(){
|
public boolean getCheckDatabaseForCascadePersistToDetachedEntity(){
|
||||||
return _checkDatabaseForCascadePersistToDetachedEntity;
|
return _checkDatabaseForCascadePersistToDetachedEntity;
|
||||||
@ -569,7 +569,7 @@ public class Compatibility {
|
|||||||
* only applies for the case where we are trying to cascade a persist to an Entity which doesn't have a StateManager
|
* only applies for the case where we are trying to cascade a persist to an Entity which doesn't have a StateManager
|
||||||
* and we can't determine if it is detached.
|
* and we can't determine if it is detached.
|
||||||
*
|
*
|
||||||
* @since 2.1.x
|
* @since 2.1.1
|
||||||
*/
|
*/
|
||||||
public void setCheckDatabaseForCascadePersistToDetachedEntity(boolean b){
|
public void setCheckDatabaseForCascadePersistToDetachedEntity(boolean b){
|
||||||
_checkDatabaseForCascadePersistToDetachedEntity = b;
|
_checkDatabaseForCascadePersistToDetachedEntity = b;
|
||||||
|
@ -458,6 +458,25 @@
|
|||||||
<xref linkend="jpa_2.2_allocationSize"/>.
|
<xref linkend="jpa_2.2_allocationSize"/>.
|
||||||
</para>
|
</para>
|
||||||
</section>
|
</section>
|
||||||
|
<section id="jpa_2.2_cascadePersist">
|
||||||
|
<title>
|
||||||
|
Cascade persist behavior
|
||||||
|
</title>
|
||||||
|
<!-- See OPENJPA-1986 for details. -->
|
||||||
|
<para>
|
||||||
|
In previous releases, OpenJPA would check the database for the
|
||||||
|
existence of the related Entity before persisting the relationship to
|
||||||
|
that Entity. This resulted in an extra Select being sent to the
|
||||||
|
database. In 2.2.0, code was added so that when cascading a persist to
|
||||||
|
a related Entity without persistence state, the persist (insert) will
|
||||||
|
happen without first checking the database. This may result in an
|
||||||
|
EntityExistsException if the related Entity already exists in the
|
||||||
|
database. To revert this behavior to the previous release, set the
|
||||||
|
value of the <literal>openjpa.Compatibility</literal>
|
||||||
|
property <literal>CheckDatabaseForCascadePersistToDetachedEntity</literal>
|
||||||
|
to <literal>true</literal>.
|
||||||
|
</para>
|
||||||
|
</section>
|
||||||
</section>
|
</section>
|
||||||
</section>
|
</section>
|
||||||
</appendix>
|
</appendix>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user