You are viewing a plain text version of this content. The canonical link for it is here.
Posted to oak-issues@jackrabbit.apache.org by "Christan Keller (JIRA)" <ji...@apache.org> on 2014/04/03 16:00:46 UTC
[jira] [Created] (OAK-1674) Node isNew() is false in case the node
is removed and added in same commit
Christan Keller created OAK-1674:
------------------------------------
Summary: Node isNew() is false in case the node is removed and added in same commit
Key: OAK-1674
URL: https://issues.apache.org/jira/browse/OAK-1674
Project: Jackrabbit Oak
Issue Type: Bug
Components: jcr
Affects Versions: 0.19
Reporter: Christan Keller
When you remove a Node /path/a transiently and add one add /path/a again.
The transiently added Node isNew() check will be false.
{code}
root.getNode(name).remove();
Node newNode = root.addNode(name);
nowNode.isNew() => false
{code}
The API says
{quote}
Returns true if this is a new item, meaning that it exists only in transient storage on the Session and has not yet been saved. Within a transaction, isNew on an Item may return false (because the item has been saved) even if that Item is not in persistent storage (because the transaction has not yet been committed)....
quote}
--
This message was sent by Atlassian JIRA
(v6.2#6252)