Simple JPA query will not return expected result
I'm hoping that this is an easy problem to fix.
I have a simple JPA query like this:
SELECT o FROM Client o WHERE o.company IS NULL OR NOT(o.company.companyID = 1)
I can not get the results from both conditions in my clause. The is null condition does nothing when i have the other condition in place. I get results if i use either condition by itself, but only the results from the companyID =1 if I put them together.
Not sure what I can do to fix this without going to a native query. Quite annoying.