Hi,
if you have stored "First line\nSecond line" nullSafeGet will
return "First lineSecond line".
The simple solution would be to add a "\n" after each line expected
the last one.
However what you are thinking about this solution:
public Object nullSafeGet(ResultSet rs, String[] names, Object
owner) throws HibernateException, SQLException {
Clob clob = rs.getClob(names[0]);
if(clob == null) {
return null;
}
return clob.getSubString(1, (int) clob.length());
}
This also works fine for more than 4000 characters and null values.
Bye
Kai |