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 "Amit Jain (JIRA)" <ji...@apache.org> on 2014/09/30 09:42:59 UTC
[jira] [Updated] (OAK-1674) Node isNew() is false in case the node
is removed and added in same commit
[ https://issues.apache.org/jira/browse/OAK-1674?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Amit Jain updated OAK-1674:
---------------------------
Fix Version/s: (was: 1.1)
1.1.0
> 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
> Assignee: Michael Dürig
> Fix For: 1.1.0
>
> Attachments: Issue.java
>
>
> 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.3.4#6332)