sqlhibernatepostgresqljpaentitymanager

Postgresql, hibernate "is not distinct"


Is there an easy way to write is not distinct from operator using CriteriaBuilder without Disjunction?

SQL condition

where field1 is not distinct from field2

Solution

  • I solved it by creating own function which will check two fields using native is not distinct from. Then I can use my function in CriteriaBuilder via function().