There are several ways to do that. Here's one example using the link from the child (this) to the parent (Other) in the link table :
select mcOtherMskeyvalue RoleName,mcThisMskeyValue Childrole from idmv_link_ext where mcOtherMskeyValue = 'ROLE.A.A.A' and mcThisOcName ='MX_ROLE'
Change mcThisOcName to MX_PRIVILEGE to see what privileges are assigned by role membership.
You can also use the attribute references, but these are just a view of the above and not as efficient and a bit more clunky:
select mcMskeyValue ChildRoles from idmv_entry_simple where mcEntryType = 'MX_ROLE' and
mcmskey in
(select mcmskey from idmv_vallink_basic where mcAttrname = 'MXREF_MX_ROLE'
and mcSearchvalue = (select convert(varchar,mcmskey) from idmv_entry_simple where mcmskeyvalue = 'ROLE.A.A.A')
)
Not sure if you consider any of these straight forward though.
-
Per Christian