File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Hibernate and boolean vs. integer

 
Ted Bell
Ranch Hand
Posts: 52
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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..
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic