harvey waters wrote:
Anybody know a quick way of finding the most recent version of a node,
currently I iterate through all the versions in the version history and look
for the Version node that has no successors, is this the quickest way of
doing it ?

If you want to get the latest version of a node in your workspace you can use getBaseVersion():

Node node = getSession().getNodeByUUID(uuid);
Version version = node.getBaseVersion();
Node versionNode = version.getNode(JcrConstants.JCR_FROZENNODE);

AFAIK this base version might be different in different workspaces.

Cheers,
Christoph

Reply via email to