You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@chemistry.apache.org by Carlo Sciolla <ca...@backbase.com> on 2012/12/05 11:17:37 UTC

getAllVersions with non unique creationDates

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)