From f570eb5922af2feda9f5fa56a270c1c31d0784c5 Mon Sep 17 00:00:00 2001 From: Jefersson Nathan Date: Thu, 5 Jan 2017 12:46:01 -0300 Subject: [PATCH] =?UTF-8?q?#2190=20=E2=80=94=20Refer=20link=20to=20proper?= =?UTF-8?q?=20section=20and=20links=20more=20occurrence=20from=20Transitiv?= =?UTF-8?q?e=20Persistence?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/en/reference/working-with-associations.rst | 2 ++ docs/en/reference/working-with-objects.rst | 13 ++++++------- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/docs/en/reference/working-with-associations.rst b/docs/en/reference/working-with-associations.rst index 85ffaee3a..fed47a9a4 100644 --- a/docs/en/reference/working-with-associations.rst +++ b/docs/en/reference/working-with-associations.rst @@ -402,6 +402,8 @@ There are two approaches to handle this problem in your code: association management methods. Reads of the Collections directly after changes are consistent then. +.. _transitive-persistence: + Transitive persistence / Cascade Operations ------------------------------------------- diff --git a/docs/en/reference/working-with-objects.rst b/docs/en/reference/working-with-objects.rst index 01a7692e7..32f1a3ee9 100644 --- a/docs/en/reference/working-with-objects.rst +++ b/docs/en/reference/working-with-objects.rst @@ -238,7 +238,7 @@ as follows: persist operation. However, the persist operation is cascaded to entities referenced by X, if the relationships from X to these other entities are mapped with cascade=PERSIST or cascade=ALL (see - ":doc:`Transitive Persistence `"). + ":ref:`Transitive Persistence `"). - If X is a removed entity, it becomes managed. - If X is a detached entity, an exception will be thrown on flush. @@ -279,12 +279,12 @@ as follows: - If X is a new entity, it is ignored by the remove operation. However, the remove operation is cascaded to entities referenced by 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 `"). - If X is a managed entity, the remove operation causes it to become removed. The remove operation is cascaded to entities referenced by X, if the relationships from X to these other entities is mapped with cascade=REMOVE or cascade=ALL (see - "Transitive Persistence"). + ":ref:`Transitive Persistence `"). - If X is a detached entity, an InvalidArgumentException will be thrown. - 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 referenced by X, if the relationships from X to these other entities is mapped with cascade=DETACH or cascade=ALL (see - "Transitive Persistence"). Entities which previously referenced X + ":ref:`Transitive Persistence `"). Entities which previously referenced X will continue to reference X. - If X is a new or detached entity, it is ignored by the detach operation. - If X is a removed entity, the detach operation is cascaded to entities referenced by X, if the relationships from X to these other entities is mapped with cascade=DETACH or cascade=ALL (see - "Transitive Persistence"). Entities which previously referenced X + ":ref:`Transitive Persistence `"). Entities which previously referenced X will continue to reference X. 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, however, the merge operation is cascaded to entities referenced by relationships from X if these relationships have been mapped with - the cascade element value MERGE or ALL (see "Transitive - Persistence"). + the cascade element value MERGE or ALL (see ":ref:`Transitive Persistence `"). - For all entities Y referenced by relationships from X having the 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