Book a Demo

Author Topic: Traceability and Attribute Types  (Read 14796 times)

William McKenzie

  • EA User
  • **
  • Posts: 61
  • Karma: +0/-0
    • View Profile
Traceability and Attribute Types
« on: June 15, 2013, 03:12:30 am »
Is there any way to easily see which structured Types are used as attributes of other classes without an explicit association? It seems like this is a really simple and important relationship that should be derivable automatically from the model, but even with 'Classifiers' checked, the traceability window does not report the fact that a given class is used as the Type of an attribute in another class. Same with method parameters. If I say that class A is an argument of a method on class B, there is automatically some sort of dependency that should be implied and visible in the tool.

~Bill

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: Traceability and Attribute Types
« Reply #1 on: June 15, 2013, 06:17:49 am »
You need to write a SQL to check that. t_attribute.Classifier equal to t_object.objectId will show you the used classes.

q.

William McKenzie

  • EA User
  • **
  • Posts: 61
  • Karma: +0/-0
    • View Profile
Re: Traceability and Attribute Types
« Reply #2 on: June 16, 2013, 08:29:57 am »
Yes, I can do that, I'm just kind of whinging about it. It would be very useful to see these things in relationship matrices or the traceability window. I guess I could log a feature request.

On that same topic, it appears somewhat random as to when Classifier is null vs 0 (even the identical primitive type, like double, can be either 0 or null for Classifier). Have you stumbled across a logic to that in your database investigations, by any chance? Also, for some reason Classifier and objectId have different datatypes in SQL, so you have to do some casting to make it work.

Something like this shows me what I need:

Code: [Select]
select o.Name,o.Stereotype,att.* from
t_object o,
(select a.Object_ID,a.Name,a.Type,a.Classifier,c.Name
    from t_attribute a  
    left outer join t_object  c on Cstr(c.Object_ID) = a.Classifier) att
where o.Object_ID=att.Object_ID

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: Traceability and Attribute Types
« Reply #3 on: June 16, 2013, 08:26:41 pm »
I haven't dug into that but I would not be astonished to see 0 and NULL mixed - EAUI.

Faintly I remember having seen this in certain cases, but can't recall in which. Likely I didn't care and was just thinking EAUI....

q.
« Last Edit: June 16, 2013, 08:29:50 pm by qwerty »

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Traceability and Attribute Types
« Reply #4 on: June 17, 2013, 03:49:32 pm »
Bill,

The EA Navigator shows traceability between attributes and their type, and between parameters and their type.

And yes, for some reason t_Attribute.Classifier is not an integer field  whereas all other ID's are. ::)

Geert