NativeCriteria
NativeCriteria copied to clipboard
Union/Union All
Hi, is there a way to use UNION or UNION ALL between two NativeQueries? I have looked on the source code and didn't found.
Thank you!
I afraid that currently there is no UNION & UNION ALL expressions on the NativeCriteria. Unfortunately I don't have a lot of time to make that change in the near time so the PR would be welcome.
I think it would be good to create UNIONs similar like JOINSs and add them on the NativeCriteria#toSql() part.
Everything is build on the top of the NativeExp so the extension should be easy.
Thank you! I will try do this week, and also try to add the possibility to use a NativeCriteria object instead of a String main table. With that we can use SQLs like select * from (select * from tables) t where t.a1=1.
Thank you