Hello,
I would like to customize the MySQL dialect (e.g. the MySQL5InnoDBDialect) so that it uses a TINYINT(1) column type for a Boolean property, instead of BIT(1).
I looked at the class "org.hibernate.dialect.Dialect" and found
Code:
registerHibernateType( Types.BIT, Hibernate.BOOLEAN.getName() );
This is the only place where I could find something with "boolean".
Now I thought I might just add a
Code:
registerHibernateType( Types.TINYINT, Hibernate.BOOLEAN.getName() );
But "Types.TINYINT" is already "mapped" to "Hibernate.BYTE.getName()" some lines below, and that would overwrite the association for "Types.TINYINT".
Does anyone have a hint, how to alter the dialect class to use a TINYINT(1) column type for Boolean class properties?
Thanks a lot for your help!