dynamic subquery?
Is it possible to make dynamic subquery? I need to filter subquery by some value and cant figure out how to make it.
7 Replies
error message i get:
I tried adding alias later, but it also does not work:
After you use
.as()
it's an aliased subquery. The $dynamic()
method is not available anymore
Also, this is not going to do what you think it'll dois it possible to somehow add alias with
.as()
later, from dunamic query? I tried doing it above with no success.
why is that? it translates almost 1:1 to which is fine, but I need to apply some conditional filtering to subqueryYou can't call methods more that once
If you call where a second time, it the first filters will get overriden
oh you are right, i will try to construct filtering array before making subquery
Here is what you should do:
Yes
ok, i tested it and it works, thanks a lot, i was stuck for a while