[
https://issues.apache.org/jira/browse/OAK-993?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13761787#comment-13761787
]
Michael Dürig commented on OAK-993:
-----------------------------------
At revision 1521055 I changed {{Item.save}} such that it throws an
{{UnsupportedRepositoryOperationException}} when the sub-tree rooted at that
item does not contain all transient modifications. That is, {{Item.save}}
succeeds if and only if its effect on the persisted state is the same as if
calling {{Session.save}}.
The old behaviour can be restored through
{{-Ditem-safe-does-session-safe=true}}. In this case {{Item.save}} always
delegates to {{Sessions.save}}, thus unconditionally saving all transient
changes.
> Improve backward compatibility for Item.save and Item.refresh
> -------------------------------------------------------------
>
> Key: OAK-993
> URL: https://issues.apache.org/jira/browse/OAK-993
> Project: Jackrabbit Oak
> Issue Type: Improvement
> Components: jcr
> Reporter: Michael Dürig
>
> As described in OAK-132 and OAK-141, both methods are implemented by
> delegating back to the respective {{Session}} methods and writing a warning
> to the log. This might introduce difficult to diagnose errors for those
> clients that rely on being able to only save/refresh parts of the transient
> space. A better solution might be to detect whether a save/refresh covers all
> transient changes and only then delegate back to the respective {{Session}}
> operation but throw an {{UnsupportedRepositoryException}} otherwise.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira