Sparx Systems Forum

Enterprise Architect => Automation Interface, Add-Ins and Tools => Topic started by: JoostN on April 08, 2022, 07:00:53 pm

Title: Query on t_attribute returns empty result
Post by: JoostN on April 08, 2022, 07:00:53 pm
I have a small question, it is really a mystery for me:
Why would a simple query like "select * from t_attribute" return an empty result?
Selecting from t_object works normally.
Thanks!
Title: Re: Query on t_attribute returns empty result
Post by: qwerty on April 08, 2022, 07:31:24 pm
Most likely you don't have attributes...

q.
Title: Re: Query on t_attribute returns empty result
Post by: JoostN on April 09, 2022, 12:32:52 am
I have a ConstraintBlock, if I show its properties in the GUI, I find a non-empty list of Constraints.
Because Constraints is a Collection under Attributes, I'm looking in t_attribute. Maybe I'm mislead?
Title: Re: Query on t_attribute returns empty result
Post by: qwerty on April 09, 2022, 01:12:22 am
Constraints are not attributes, right? Element constraints are in t_objectconstraints. You'd better use the API if you don't know the tables...

q.
Title: Re: Query on t_attribute returns empty result
Post by: JoostN on April 09, 2022, 01:34:33 am
I want to avoid iterating through my model using API calls and speed up my app using DB queries.
I should have looked further in the documentation to find the correct table, I was too quick in my conclusions.
Thanks for putting me on the right track!
Joost