Author Topic: Find usage of a class as attribute  (Read 2680 times)

GBeutler

  • EA User
  • **
  • Posts: 23
  • Karma: +0/-0
  • I love YaBB 1G - SP1!
    • View Profile
Find usage of a class as attribute
« on: September 17, 2010, 09:20:48 pm »
Hi All,

how can I find out if a class is used as attribute by another class? Relationships and other dependencies can be fond at the element view but I was not able to find anything for usage as attribute there. Thanks in advance and

best regards,

Guido

lubos

  • EA User
  • **
  • Posts: 101
  • Karma: +0/-0
  • I love YaBB 1G - SP1!
    • View Profile
Re: Find usage of a class as attribute
« Reply #1 on: September 17, 2010, 10:07:09 pm »
Hello,

although you are asking for some front-end solution  I hope the following can help you too:

SELECT * FROM T_ATTRIBUTE a WHERE a.CLASSIFIER = (SELECT o.OBJECT_ID FROM T_OBJECT o WHERE o.EA_GUID='GUID of CLASS');

but this will probably work only if the class as a attribute type was chosen by selecting the class in project tree, I think that if it was written by hand, classifier will not be filled so you will have to search it by name which could not be  "precise"

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13295
  • Karma: +557/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Find usage of a class as attribute
« Reply #2 on: September 17, 2010, 10:20:00 pm »
This http://community.sparxsystems.com/resources/model-search/search-attributes-type might be a bit easier, although it is name based.

You can easily change that to guid-based if needed.

Geert