chemistry-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Carlo Sciolla <ca...@backbase.com>
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
AbstractCmisService.getObjectInfoIntern:

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

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.

WDYT?

Thanks

-- 
Carlo Sciolla

--==(A)==--
Linux User #372086
My personal blog: http://www.skuro.tk
Follow me on twitter: http://twitter.com/skuro
 <http://twitter.com/skuro>Fork me on Github: http://github.com/skuro
<http://github.com/skuro>My LinkedIn profile:
http://nl.linkedin.com/in/carlosciolla
--==(A)==--

Senior Developer at Backbase - Next Generation Portal Software for
Financials & Large Enterprises (http://www.backbase.com)

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