I am using Documentum Developer Edition 6.6. I have run the following DQL:
select "r_object_id", "r_modify_date", "r_version_label","i_position" ,"object_name" from "dm_document" where FOLDER (ID('0bde75d18000cfa4')) and "r_object_type"='dm_document' order by "r_modify_date" asc, "i_position" desc
I expected: the DQL will return one row for each dm_documentum object. I remember – my earlier requests with this DQL did it – one roц for each document. But today I see: for some of the dm_document objects only one row returned; whereas for other dm_document objects several rows are returned per object! Like the following:
09de75d18000d514 7/28/2011 3:41 PM 1.0,CURRENT -1,-2 CORPORATE TAX DODGING FOR FUN AND PROFIT.mp3
09de75d18000d515 7/28/2011 3:41 PM 1.0 -1 DOWNWARD MOBILITY IN A RISING ECONOMY.mp3
...
09de75d18000d515 7/28/2011 3:41 PM CURRENT -2 DOWNWARD MOBILITY IN A RISING ECONOMY.mp3
In other words – for the 09de75d18000d514 one row (with repeatable “r_version_label" and "i_position" as arrays) was returned; whereas for another document 09de75d18000d515 the repeatable properties were returned as separate rows.
Why is that? For me, this looks like a bug – because of the documents 09de75d18000d514 and 09de75d18000d515 have no essential differences; they are just usual dm_document instances, nothing more.
And the more important question is: what can I do? I see the problem disappears if I remove the “"i_position" desc” from the DQL – then each dm_object is returned as single row. But I needed this “"i_position" desc” to have “r_version_label" sorted in accordance to corresponding values of the "i_position" (each item of “r_version_label" array corresponds to an item of the "i_position" array that contains its “position number”).
Maybe this my assumption – that Documentum should order the “r_version_label" accordingly to the "i_position" because of I specified “"i_position" desc” – was wrong? If so, now I see the only way to cope with this:
- I use the DQL without the “"i_position" desc”
- My software (it uses DFS) will sort the repeatable values (like “r_version_label") items itself, making assumption that Documentum will bring their items in reverse order.
Can I rely on the assumption that 'Documentum will bring items of th erepeatable properties in reverse order'? This is what I see in Documentum results; but I cannot find a formal confirmation for this in Documentum docs.