This week's book giveaway is in the Design forum.
We're giving away four copies of Building Microservices and have Sam Newman on-line!
See this thread for details.
The moose likes Other Open Source Projects and the fly likes Hibernate and boolean vs. integer Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Building Microservices this week in the Design forum!
JavaRanch » Java Forums » Products » Other Open Source Projects
Bookmark "Hibernate and boolean vs. integer" Watch "Hibernate and boolean vs. integer" New topic

Hibernate and boolean vs. integer

Ted Bell
Ranch Hand

Joined: Jan 21, 2002
Posts: 52
Hi all,

I am attempting to use Hibernate for the first time, and had a question about persisting a boolean value to a column with a datatype of integer.

Basically the column in the database is a smallint (Informix) and I would like to expose this as a boolean to the client as a boolean on the javabean object.

Is there a way to translate these without adding additional properties on the bean (getting the client to use the boolean and Hibernate the short)?

Any help appreciated..
Have you checked out Aspose?
subject: Hibernate and boolean vs. integer
It's not a secret anymore!