Skip to main content
2 of 8
edited tags
Vlad Mihalcea
  • 155.9k
  • 85
  • 599
  • 984

Mapping Java boolean to Oracle number

I have a property created like this in my model:

public class Client { private Boolean active; 

}

My RDBMS is Oracle,and the column is a number(1,0)

How can I use the Restrictions API to achieve the following functionality?

criteria.add(Restrictions.eq("active"),object.isActive()); 
Rafael Roque
  • 377
  • 2
  • 5
  • 14