Pages

Showing posts with label DQL. Show all posts
Showing posts with label DQL. Show all posts

Wednesday, January 18, 2017

DQL to retrieve all the non inherited attributes of an object type

How to retrieve all the attributes, including both the inherited and not inherited ones, of an object type? The quick way is to use DQL:

select * from dm_type  where  name='testtype' ENABLE(ROW_BASED);

If only the personal attributes without the inherited attributes are needed, the DQL should be slightly elaborated to exclude the inherited attributes:

select * from dm_type  where  name='testtype' and attr_identifier>start_pos order by attr_name ENABLE(ROW_BASED);

Obviously, one would need to replace * with the list of the needed columns, most probably such as attr_name, attr_type, attr_repeating and attr_length.