chemistry-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Carlo Sciolla <>
Subject getAllVersions with non unique creationDates
Date Wed, 05 Dec 2012 10:17:37 GMT
Dear Chemists,

this might be more of a CMIS question than Chemistry, but how should
getAllVersions behave in case multiple documents in the same version seried
have the same creationDate (e.g. when the precision is set on Date with no
Time information)?

A sample of what can go wrong is found in

// get latest version
                List<ObjectData> versions = getAllVersions(repositoryId,
object.getId(), info.getVersionSeriesId(),
                        null, Boolean.FALSE, null);
                if (versions != null && versions.size() > 0) {

Due to the ordering being on creationDate, and as multiple documents can
have the same value for that property, it seems to me that it's not safe to
say that versions.get(0) is the latest version, even if it sort of feels
like it should.



Carlo Sciolla

Linux User #372086
My personal blog:
Follow me on twitter:
 <>Fork me on Github:
<>My LinkedIn profile:

Senior Developer at Backbase - Next Generation Portal Software for
Financials & Large Enterprises (

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