I have a BOOLEAN type in a MySQL table (TINYINT(1)) and I'm trying to map the boolean field in an entity but this generates an exception:
org.hibernate.HibernateException: Wrong column type in maegul.users for column admin. Found: bit, expected: boolean
I changed the field in my entity to byte and make the respective changes so it acts a boolean, and I get:
org.hibernate.HibernateException: Wrong column type in maegul.users for column admin. Found: bit, expected: tinyint
I tried using the @Type
annotation on the field:
@Type(type = "org.hibernate.type.NumericBooleanType")
but I get:
org.hibernate.HibernateException: Wrong column type in maegul.users for column admin. Found: bit, expected: integer