Reporting question : isys_obj table
-
Hi all,
I'm trying to get a query that results all assigned objects to a specific person.
The isys_obj table has al the objects and column isys_obj__isys_obj_type__id has value 60 (this is object type LC__CMDB__OBJTYPE__RELATION).The description of objects of type 60 are in this format " <object>uses <person>", which tables (and which columns) do I have to join to get the corresponding person and object record?
Thanks.
Henk Tompot</person></object> -
Hello Henk,
you'll need to query "isys_catg_relation_list" (this is the "relation" category) and inside that table you'll need to select the rows where the field "isys_catg_relation_list__isys_relation_type__id" reference to the isys_relation_type rows with the types "C__RELATION_TYPE__USER" or "C__RELATION_TYPE__ADMIN".
It should look something like this:
SELECT * FROM isys_obj AS obj_main LEFT JOIN isys_catg_relation_list AS j4 ON j4.isys_catg_relation_list__isys_obj__id = obj_main.isys_obj__id LEFT JOIN isys_relation_type AS jn3 ON jn3.isys_relation_type__id = j4.isys_catg_relation_list__isys_relation_type__id WHERE jn3.isys_relation_type__const = 'C__RELATION_TYPE__ADMIN' OR jn3.isys_relation_type__const = 'C__RELATION_TYPE__USER';
Greetings,
Leo