Extra objects visible in DA when using Show All Objects and Versions

Hello,

In a few of the folders in the repository, I can see objects only when I select View All Objects and Versions in DA or Webtop,
when I use DQL, see below query, the count includes these objects (select count (*) from dm_document(all) where folder ('/temp', descend) )

When I use select count(*) from dm_document (all) where i_cabinet_id='' I think this query does not include those objects

Now I am confused, what are these extra objects which I can only see using Show All objects and Versions in DA??

Can anyone help please?

Comments

  • By default, DA list views display only the CURRENT version of a document and filters out any objects which are not dm_document or dm_folder of one of their subtypes. So for a example, a registered table (dm_registered) will not be displayed unless you pick Show All Objects.
    Your DQL query contains the (all) keywords so it will return all versions. Without the (all), only CURRENT versions are returned, so that matches the default behavior of DA.
    Attribute i_cabinet_id references the primary cabinet of each document. If you want to retrieve all documents within a cabinet or folder you should use the DQL folder clause (e.g. where folder('/Temp', descend)).

  • Just to add what Hicham said, if you move CURRENT version of a document to a different cabinet, the previous versions still stay in old cabinet and still have i_cabinet_id of old cabinet. Instead of moving, if you create a new additional link of CURRENT version of document to another cabinet, the i_cabinet_id is still pointing to old cabinet b/c primary cabinet is still the old cabinet.