jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michael Neale" <michael.ne...@gmail.com>
Subject Re: Version properties
Date Thu, 21 Sep 2006 08:59:04 GMT
yeah, thats the trick - fortunately I had someone show me that but at first
it stumped me - perhaps put something on the FAQ in the wiki so others can
benefit?

On 9/20/06, JavaJ <ponfar99@yahoo.com> wrote:
>
>
>
>
> JavaJ wrote:
> >
> > I'm having a problem with getting Node properties from the different
> > Versions of a Node.  For example:
> >
> > javax.jcr.Node node = session.getNodeByUUID(id);
> > javax.jcr.version.VersionIterator it =
> > nodeToRestore.getVersionHistory().getAllVersions();
> > while (it.hasNext()) {
> >     javax.jcr.version.Version version = it.nextVersion();
> >     version.getProperty("myProp");  <-- this throws a
> > PathNotFoundException
> > }
> >
> > I'm not sure why this throws the exception.   I thought that Version is
> > just a wrapper around the versioned Node.  So shouldn't you be able to
> get
> > all the properties in that version of the Node?  It appears that only
> the
> > mix:versionable properties are available, i.e. jcr:predecessors,
> > jcr:isCheckedOut...
> >
> > Is there a way around this?  Like maybe a way of getting the versionable
> > Node?
> >
>
> Ah nevermind.  I just had to get the "jcr:frozenNode" child node.  Duh. :)
> --
> View this message in context:
> http://www.nabble.com/Version-properties-tf2308388.html#a6418106
> Sent from the Jackrabbit - Users mailing list archive at Nabble.com.
>
>

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