Hello Good people,
I am having a very frustrating problem and I hope someone can help me.
I am using a web application with mysql 5.0.27 and hibernate 2.1 (I know it's old, but we can't upgrade at this point).
Occasionaly, after a transaction I see that MySQL is complaining about "com.mysql.jdbc.MysqlDataTruncation: Data truncation: Data too long for column...". I also noticed that it is always columns of type bit(1).
After a research over the web I understood that mysql changed thier bit field support in version 5.0.5 and I saw some articles suggesting to avoid working with bit fields.
The problem is that hibernate keeps mapping java.boolean to bit(1) columns.
My question is how can I change this mapping and to force hibernate to map boolean into tinyint(1).
I bumped into the dialect classes but I think I didn't do it correctly since nothing happened.
Any help will be highly appriciated - I am working on this for days.
Thanks
TS.
|