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)