Order of models in list - Query Precedence?

  • 2
  • Question
  • Updated 5 years ago
Kind of an observation, but kinda a question.
The order of models is important if one model uses a field from another.(?)

I have a queue/detail screen. I want the queue to filter based on running user information.
So I have a RunningUser model which pulls in the fields I want, and to keep it out of the way, I had it at the bottom of the Models list.

So I modified the queue model condition to use a field on RunningUser, but it never worked.

until.. I moved RunningUser to the top of the model list. (Being able to re-order the models, kinda tells me that it's important)

So the order of models is important.(!)

Is this the way it's supposed to work?  I looked around but my queries failed to find any documentation of this. (granted I just queried the conversations and did a quick look at the model tutorial)

Photo of Seth Vanderdrift

Seth Vanderdrift

  • 878 Points 500 badge 2x thumb

Posted 5 years ago

  • 2
Photo of Pat Vachon

Pat Vachon, Champion

  • 45,310 Points 20k badge 2x thumb
Yes. The order does make a difference. Especially on page load where conditions rely on values from another model.
Photo of Rob Hatch

Rob Hatch, Official Rep

  • 44,988 Points 20k badge 2x thumb
You are correct. In "field from another model" conditions the order that the queries run is critical.  That is really the only time,  but since that is such a powerful (and often used) feature of Skuid, it deserves to be better documented.  I'll pass the request along to Josh,  our doc guru..