How to know if a document is a version with Java Client 3.5.0
I am trying to know if a document is a version, but Java Client doesn't retrieve that information about a document. When I use the “fetchDocumentById” method, I get a “Document” object, but I have no properties to know if it is a version or not. I have included the “properties” header with the “*” value in order to retrieve all propoerties, but “ecm” properties are not retrieved.
I have used the REST API and I can see two properties that can tell me if the document is a version or not: versionableId and isVersion. However, none of them are present in the “Document” object retrieved by the fetchDocumentById method.
Then, how can I know if a document is a version? I have also seen a facet called “Immutable” present in versions, but I am not sure if it is possible there are other documents with that facet without being a version.
The property which differentiate a live document from a version is