Book a Demo

Author Topic: How to access the type of a Part (property)  (Read 5390 times)

jplusip

  • EA User
  • **
  • Posts: 69
  • Karma: +0/-0
    • View Profile
How to access the type of a Part (property)
« on: October 07, 2015, 04:45:49 am »
So, in a SysML project, I have some parts (otherwise Properties) that are being typed by defined valueTypes. I would like to extract this type in a SQL statement, but all Object_Type extracts is Property (which is the type).

Is there an alternate "Object_Type" that I can use to grab this information?

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: How to access the type of a Part (property)
« Reply #1 on: October 07, 2015, 05:13:04 am »
Educated guess: join t_object again using the Classifier column.

Geert

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8110
  • Karma: +119/-20
    • View Profile
Re: How to access the type of a Part (property)
« Reply #2 on: October 07, 2015, 08:16:01 am »
Quote
Educated guess: join t_object again using the Classifier column.

Geert
join t_object.ea_guid = t_object2.PDATA1

jplusip

  • EA User
  • **
  • Posts: 69
  • Karma: +0/-0
    • View Profile
Re: How to access the type of a Part (property)
« Reply #3 on: October 09, 2015, 04:47:58 am »
Thanks for the responses, but I'm still having some issues (admittedly, I went a different direction before checking in here again).

So, to be clear, I'm making a custom SQL query in the document template editor. Currently (testing this in a small dummy model), I have the following SQL query:

select p.Name as Property, v.Name as Type
from t_object as p, t_object as v
where v.Object_ID = p.Classifier
order by p.Name, v.Name

It seems to me that this should work. However, nothing is being displayed on the generated documents. Any idea of why that is?

Edit:
Tried out Simon's approach using ea_guid and PDATA1 and that worked like a charm! Thanks Simon! Still, out of curiosity, why doesn't the .Classifier work in this case? According to qwerty's book that should be the primary key for the classifier.
« Last Edit: October 09, 2015, 05:55:31 am by jplusip »

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: How to access the type of a Part (property)
« Reply #4 on: October 09, 2015, 08:05:58 am »
PDATA1 contains the guid of the classifier. Which part of my book are you referring to?

q.

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8110
  • Karma: +119/-20
    • View Profile
Re: How to access the type of a Part (property)
« Reply #5 on: October 09, 2015, 08:29:44 am »
This decision was before my time here. But I believe that technically this relationship is not a classifier. (Classifier is the opposite of the instance property and there's no instances in use)

jplusip

  • EA User
  • **
  • Posts: 69
  • Karma: +0/-0
    • View Profile
Re: How to access the type of a Part (property)
« Reply #6 on: October 10, 2015, 02:26:07 am »
Quote
PDATA1 contains the guid of the classifier. Which part of my book are you referring to?

q.

2.1.5 Misc on p. 8. Then below is PDATA1, but I don't see anything about a classifier there.

Admittedly, your book has possibly been updated in the year+ since I originally purchased it.

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: How to access the type of a Part (property)
« Reply #7 on: October 10, 2015, 02:44:44 am »
Looks like this table needs an update :-)

q.