shared items

Friday, May 21, 2010

Hibernate: Fixed char(n) in mysql to java string

Please see this link. I had same problem: ... highlight=

Please see last entry which solved my problem. In mapping file if you can make changes link this:

from your ref:

change to:

This should solve you problem. By default Hibernate assumes that the column is string and compares against VARCHAR(255). This problem happens only when schema is validated. For any other cases this problem will not arise