DQL based on object_id

448 Views Asked by At

How can we access chronicle id based on object_id in DQL? Can someone please provide the schema details related to the object_id's of a document having the same chronicle_id, so that we can access chronicle id even though we are provided with the old object_id?

Here dm_document has only the current object_id saved in it.

2

There are 2 best solutions below

0
On

i_chronicle_id is a system attribute, so from API if you run: dump,c,*r_object_id* it will return the object dump which will have the i_chronicle_id of the object.

0
On
select i_chronicle_id from dm_document where r_object_id='your id'

This will return the ChronicleId of the specified dm_document object. The ChronicleId is the same for all versions of an object, and every object will have one. If you are looking for the reverse, and instead want to see all ObjectIds for a given ChronicleId, then your query would look like this:

select r_object_id from dm_document (ALL) where i_chronicle_id='your id'

This is essentially looking at the different versions of an object.