1
0
mirror of synced 2025-02-03 05:49:25 +03:00

#2190 — Refer link to proper section and links more occurrence from Transitive Persistence

This commit is contained in:
Jefersson Nathan 2017-01-05 12:46:01 -03:00
parent a1839048dd
commit f570eb5922
No known key found for this signature in database
GPG Key ID: 7989ABC1B60C41D7
2 changed files with 8 additions and 7 deletions

View File

@ -402,6 +402,8 @@ There are two approaches to handle this problem in your code:
association management methods. Reads of the Collections directly association management methods. Reads of the Collections directly
after changes are consistent then. after changes are consistent then.
.. _transitive-persistence:
Transitive persistence / Cascade Operations Transitive persistence / Cascade Operations
------------------------------------------- -------------------------------------------

View File

@ -238,7 +238,7 @@ as follows:
persist operation. However, the persist operation is cascaded to persist operation. However, the persist operation is cascaded to
entities referenced by X, if the relationships from X to these entities referenced by X, if the relationships from X to these
other entities are mapped with cascade=PERSIST or cascade=ALL (see other entities are mapped with cascade=PERSIST or cascade=ALL (see
":doc:`Transitive Persistence <working-with-associations>`"). ":ref:`Transitive Persistence <transitive-persistence>`").
- If X is a removed entity, it becomes managed. - If X is a removed entity, it becomes managed.
- If X is a detached entity, an exception will be thrown on - If X is a detached entity, an exception will be thrown on
flush. flush.
@ -279,12 +279,12 @@ as follows:
- If X is a new entity, it is ignored by the remove operation. - If X is a new entity, it is ignored by the remove operation.
However, the remove operation is cascaded to entities referenced by However, the remove operation is cascaded to entities referenced by
X, if the relationship from X to these other entities is mapped X, if the relationship from X to these other entities is mapped
with cascade=REMOVE or cascade=ALL (see "Transitive Persistence"). with cascade=REMOVE or cascade=ALL (see ":ref:`Transitive Persistence <transitive-persistence>`").
- If X is a managed entity, the remove operation causes it to - If X is a managed entity, the remove operation causes it to
become removed. The remove operation is cascaded to entities become removed. The remove operation is cascaded to entities
referenced by X, if the relationships from X to these other referenced by X, if the relationships from X to these other
entities is mapped with cascade=REMOVE or cascade=ALL (see entities is mapped with cascade=REMOVE or cascade=ALL (see
"Transitive Persistence"). ":ref:`Transitive Persistence <transitive-persistence>`").
- If X is a detached entity, an InvalidArgumentException will be - If X is a detached entity, an InvalidArgumentException will be
thrown. thrown.
- If X is a removed entity, it is ignored by the remove operation. - If X is a removed entity, it is ignored by the remove operation.
@ -350,14 +350,14 @@ as follows:
become detached. The detach operation is cascaded to entities become detached. The detach operation is cascaded to entities
referenced by X, if the relationships from X to these other referenced by X, if the relationships from X to these other
entities is mapped with cascade=DETACH or cascade=ALL (see entities is mapped with cascade=DETACH or cascade=ALL (see
"Transitive Persistence"). Entities which previously referenced X ":ref:`Transitive Persistence <transitive-persistence>`"). Entities which previously referenced X
will continue to reference X. will continue to reference X.
- If X is a new or detached entity, it is ignored by the detach - If X is a new or detached entity, it is ignored by the detach
operation. operation.
- If X is a removed entity, the detach operation is cascaded to - If X is a removed entity, the detach operation is cascaded to
entities referenced by X, if the relationships from X to these entities referenced by X, if the relationships from X to these
other entities is mapped with cascade=DETACH or cascade=ALL (see other entities is mapped with cascade=DETACH or cascade=ALL (see
"Transitive Persistence"). Entities which previously referenced X ":ref:`Transitive Persistence <transitive-persistence>`"). Entities which previously referenced X
will continue to reference X. will continue to reference X.
There are several situations in which an entity is detached There are several situations in which an entity is detached
@ -416,8 +416,7 @@ as follows:
- If X is a managed entity, it is ignored by the merge operation, - If X is a managed entity, it is ignored by the merge operation,
however, the merge operation is cascaded to entities referenced by however, the merge operation is cascaded to entities referenced by
relationships from X if these relationships have been mapped with relationships from X if these relationships have been mapped with
the cascade element value MERGE or ALL (see "Transitive the cascade element value MERGE or ALL (see ":ref:`Transitive Persistence <transitive-persistence>`").
Persistence").
- For all entities Y referenced by relationships from X having the - For all entities Y referenced by relationships from X having the
cascade element value MERGE or ALL, Y is merged recursively as Y'. cascade element value MERGE or ALL, Y is merged recursively as Y'.
For all such Y referenced by X, X' is set to reference Y'. (Note For all such Y referenced by X, X' is set to reference Y'. (Note