-
Notifications
You must be signed in to change notification settings - Fork 869
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
GroupBy with union of ListSubQuery #282
Comments
I will add groupBy and having to Unions.
It's possible if you use the same alias, but that's probably not what you are after. |
sgrainview and smortalityview are views and already have groupBy clause in their definition. What I want to do is to group the results of the 2 views. Something like
For the alias, do you really think it could work? And How would you use it? |
You can express now a query like this
I just realized that for Querydsl SQL the alias instances are strictly bound to the table they belong to. So sharing the where expression is difficult, unless you share also all the top level expressions that are used in the expression. |
Thanks Timo, Where do you store the Snapshots? For the where, the views (18 in fact) are all the same because when using a UNION, I should have the same columns... If you have a solution, it will be welcome otherwise I'll continue doing something stupid like:
|
There are no automated snapshots, but I will make a release this weekend.
sgrainview and smortalityview are of different type? You could instantiate them with the same alias and then use one expression for the where part like this
I didn't try this, but something like this should work. |
Released in 2.9.0 |
Hi,
It seems that I can't user a GroupBy after using union on ListSubQuery.
Hese is my code:
It's quite strange as I can order.
Do you have a solution fot that?
Another little question if I may...
Is it possible to use the same where clause on 2 different table (in my case sgrainview and smortalityview).
I would be please if I can do something like:
The text was updated successfully, but these errors were encountered: