Hello,
we have the same problem here at a clients database.
MySQL Version: 5.0.27 Standard Community Edition
I have searched the forum. It seems that this is a problem for others too, but I couldnt find a solution so far.
Our case is the following:
We have an Order table, and there is a SQL CHAR(1) field.
But in some Orders there is an empty string "" in this column. The field is defined as
Code:
`myField` char(1) collate latin1_general_ci NOT NULL default 'N',
We use Hibernate with Annotations and the mapping of this field looks like:
Code:
@Column(name = "myField", unique = false, nullable = false, insertable = true, updatable = true, length = 1)
public char getMyField() {
return this.myField;
}
Is there anything we can do from withhin Hibernate to prevent this? Either a change to the annotation.
I don;t know if we can manage to change anything at the database level.
Thanks
Christoph