jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jacco van Weert" <1111softw...@gmail.com>
Subject Re: question about save Node
Date Fri, 01 Sep 2006 14:00:26 GMT
On 9/1/06, Stefan Guggisberg <stefan.guggisberg@gmail.com> wrote:
>
> On 9/1/06, Jukka Zitting <jukka.zitting@gmail.com> wrote:
> > Hi,
> >
>
> >     Node parent = Session.getRootNode().getNode(...);
> >     Node child = parent.addNode(...);
> >     child.save();
>
> that would be a violation of the jsr 170 spec:
>
> see 7.1.4 Adding Nodes
> [...]
> In order to save a newly added node, save must be called either on the
> Session, or on the new node's parent or higher-order ancestor
> (grandparent, etc.). An attempt to call save only on the newly added
> node will throw a RepositoryException.
> [...]
>
> cheers
> stefan



I don't know why this constraint is added, because I think there are
situations where it's quite normal to save only 1 node at a time.


Greetings,

  Jacco

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message