Is there a way to get previously published versions documents using NXQL?

Suppose that I have published document 'abcd' with version 1.0. Then later, I modify the document and publish it with 1.5.

I want to get a hold of the previously published version of a document using NXQL. Is there a way to do that? Something like this:

SELECT * FROM Document WHERE ecm:uuid='abcd' and uid:major_version='1' and uid:minor_version='0'
0 votes

1 answers

3601 views

ANSWER

Alternatively, is there an operation (like the ones listed here: http://explorer.nuxeo.org/nuxeo/site/distribution/current/listOperations) that I can call from the automation api client to get a specific version of a document
07/25/2013

It would be useful, I added NXP-12104 to track this feature request.
07/26/2013

So if this feature does not exist, how do you retrieve previous versions of documents?
07/26/2013

From Java code on the server side:

session.getVersions(doc.getRef());

or

session.getVersionsRefs(doc.getRef());

This is not something that is exposed in standard Nuxeo Operations. But you can easily write your own leveraging the above, to get what you need.

07/26/2013



See NXP-12104 for newly-added NXQL properties in Nuxeo 5.7.3.

0 votes