Author Topic: Query on t_attribute returns empty result  (Read 2350 times)

JoostN

  • EA User
  • **
  • Posts: 21
  • Karma: +0/-0
    • View Profile
Query on t_attribute returns empty result
« 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!

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +396/-301
  • I'm no guru at all
    • View Profile
Re: Query on t_attribute returns empty result
« Reply #1 on: April 08, 2022, 07:31:24 pm »
Most likely you don't have attributes...

q.

JoostN

  • EA User
  • **
  • Posts: 21
  • Karma: +0/-0
    • View Profile
Re: Query on t_attribute returns empty result
« Reply #2 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?

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +396/-301
  • I'm no guru at all
    • View Profile
Re: Query on t_attribute returns empty result
« Reply #3 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.

JoostN

  • EA User
  • **
  • Posts: 21
  • Karma: +0/-0
    • View Profile
Re: Query on t_attribute returns empty result
« Reply #4 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