Mapping Smallint, Tinyint or Int Column to Boolean in Hibernate
If you have a column in your database which may only contain the value 0 or 1 (i.e. a bit value), you probably want to map it to the boolean static type in your entity, rather than an integer. This could be the case for smallint, tinyint(1), int(1), boolean columns, etc. I found two suggestions… read more