As we transition to the new Hyland Community, some post links may be temporarily disrupted as we finalize redirects. We apologize for the inconvenience and are working to resolve this as quickly as possible. Details.
Hello. After invoke operation Document.RestoreVersion e.g. major version 2 -> major version 1, i need to update document with major version 1 and increment minor version of major version 1, but nuxeo java client return major version 2 after update major version 1. How can i fix this?
Hello, if you are using Java Client, did you try to update the version of the document by using the following?
document = nuxeoClient.operation("Document.CreateVersion").param("increment", "MINOR").input(document).execute();
In this case, with "MINOR", the version 1.0 will generate the version 1.1. You can also change "MINOR" to "MAYOR" in order to increment from 1.0 to 2.0.
Info about the Document.CreateVersion operation: http://explorer.nuxeo.com/nuxeo/site/distribution/Nuxeo%20DM-8.2/viewOperation/Document.CreateVersion
Hope it helps!
Hello Rodri. Thank you, but i mean some different things.
Well. You can play with "checkout" and "createVersion" parameters of "Document.RestoreVersion" operation. However, I think that the behavior you are expecting is not possible only with those operations. If you want to restore a document from a version, then you can generate a new version with the restored version. For example, if the document has the version 2.4, you can restore the 1.1 version but creating a new version (2.5). So 2.5 = 1.1. In other case, you might have two 1.2 versions and this is not possible.