This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach 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 Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Products » Other Open Source Projects
Bookmark "Hibernate and boolean vs. integer" Watch "Hibernate and boolean vs. integer" New topic
Author

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..
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Hibernate and boolean vs. integer
 
Similar Threads
JPA many-to-many with extra attribute
Advice on managing objects in requests
Hibernate Mapping Types.
How to do a Merge in a hibernate component
Queries and "column not found" error