From e155e86517f21df781adb4832b40576cf588a756 Mon Sep 17 00:00:00 2001 From: "Roman S. Borschel" Date: Wed, 5 May 2010 10:58:11 +0200 Subject: [PATCH] Clarified docs on persisting new objects. --- manual/en/working-with-objects.txt | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/manual/en/working-with-objects.txt b/manual/en/working-with-objects.txt index 43fdce820..abb48d40d 100644 --- a/manual/en/working-with-objects.txt +++ b/manual/en/working-with-objects.txt @@ -78,8 +78,10 @@ Example: > **CAUTION** > Generated entity identifiers / primary keys are guaranteed to be available after the -> next invocation of `EntityManager#flush()` that involves the entity in question. -> YOU CAN NOT RELY ON A GENERATED IDENTIFIER TO BE AVAILABLE AFTER INVOKING `persist`! +> next successful flush operation that involves the entity in question. +> You can not reply on a generated identifier to be available directly after invoking `persist`. +> The inverse is also true. You can not rely on a generated identifier being not available +> after a failed flush operation. The semantics of the persist operation, applied on an entity X, are as follows: