Hi everyone,
I saw in topic
https://forum.hibernate.org/viewtopic.php?f=1&t=964454&start=0 that text data type of Sybase cannot be null. The workaround is to set to empty the value. But in my case, I really need to use null values. So is it possible to change text type to another one without changing hibernate mapping but by modifying at runtime the hibernate configuration object? I tried with binary field but I still gets the "JZ006: Caught IOException: java.io.IOException: JZ0SL: Unsupported SQL type 2005" exception.
Code:
Iterator<Table> tables = (Iterator<Table>) config.getTableMappings();
while (tables.hasNext()) {
Table table = tables.next();
Iterator<Column> columns = table.getColumnIterator();
while (columns.hasNext()) {
Column column = columns.next();
Value value = column.getValue();
if (value.getType().getClass().getName().equals(TextType.class.getName())) {
column.setSqlType("IMAGE");
}
}
}
Has anyone an idea?
Note: I cannot change my hibernate version (3.2.6ga)
Regards,
Matthieu