Re: OPENJPA-2894 and -2895

2021-12-14 Thread Romain Manni-Bucau
Not sure it really helps but AFAIK the state is just a way to pass a specific data container for a value (in the dictionary), it enables to do the link with the parameters (bindings) and SQL so I see the value as a part of the AST/global expression and state as an internal way to pass what is neede

Type determination broken a bit

2021-12-14 Thread Pawel Veselov
Hello. It looks like OPENJPA-2849 changes broke a few things. UnaryOp is used for a *lot* of cases, and after the fix, it exclusively uses the type reported by the expression implementation (which is then "converted" using DBDict). I understand the reason for the fix, but, unfortunately, the expr

Re: OPENJPA-2894 and -2895

2021-12-14 Thread Pawel Veselov
Romain, On Tue, Dec 14, 2021 at 2:00 PM Romain Manni-Bucau wrote: > When I saw it - but it was something years ago so memory can be wrong - it > was because some database expected an operator expression and some others > were not supporting "where TRUE" evaluation so "where 1=1" (similarly for >

Re: OPENJPA-2894 and -2895

2021-12-14 Thread Romain Manni-Bucau
Hi Pawel, When I saw it - but it was something years ago so memory can be wrong - it was because some database expected an operator expression and some others were not supporting "where TRUE" evaluation so "where 1=1" (similarly for <>) was a nice portable workaround. Now I agree that criteria AP

OPENJPA-2894 and -2895

2021-12-14 Thread Pawel Veselov
Hello. I'm trying to fix these tickets as I ran into them the other day. -2894 looks relatively straightforward, and I have a working fix in https://github.com/veselov/openjpa/tree/OPENJPA-2894. However, I ran into -2895 as I was trying to test -2894, and fixing that looks a lot more complicated.