posted 14 years ago
You could create your own Hibernate type to map 0|1 to false|true and then use this type in your hbm mapping. Basically, Hibernate allows custom type definition, requiring the user to implement org.hibernate.usertype.UserType;. There are a few methods to override but here is an example for what you're after.
Then you just need to map your database column to the newly defined type. For example,