Book a Demo

Author Topic: SQL: notes on inherited properties?  (Read 3368 times)

Hurra

  • EA User
  • **
  • Posts: 184
  • Karma: +0/-0
    • View Profile
    • Find me at LinkedIn!
SQL: notes on inherited properties?
« on: October 22, 2018, 09:51:09 pm »
Hi!

I have an SQL query where I collect roles which are inherited, denoted with the ^-sign.

Code: [Select]
select roll.ea_guid as CLASSGUID, roll.Object_Type as CLASSTYPE, roll.Name as rName, roll.Note as rNote, rollclassifier.Name as rcName, rollclassifier.Note as rcNote, org.Name as oName, org.Note as oNote, instans.Name as iName, instans.Note as iNote

from (((t_object roll
inner join t_object org on roll.parentid = org.object_id)
inner join t_object instans on org.parentid = instans.object_id)
left join t_object rollclassifier on rollclassifier.Object_ID = roll.pdata1)

where instans.Object_ID = #OBJECTID#
and roll.stereotype = 'ResourceRole'

roll.Note is empty, although when I select it in the project browser, or on a diagram, the Notes section has text. My best guess is that it is an inherited property and therefore not displayed?

Also I try to find the classifier/pdata1 of this role, with no results, i.e. rollclassifier.Name and .Note is empty. Perhaps wrong type of join?

org.Name and .Note as well as instans.Name and .Note are displayed.


Thank you for your time!
always learning!

Hurra

  • EA User
  • **
  • Posts: 184
  • Karma: +0/-0
    • View Profile
    • Find me at LinkedIn!
Re: SQL: notes on inherited properties?
« Reply #1 on: October 22, 2018, 10:30:42 pm »
Solution:

pdata1 = guid, not objectid

...

 :-X
always learning!