Can Hibernate default a Null String to Empty String

Posted by sliver on Stack Overflow See other posts from Stack Overflow or by sliver
Published on 2010-04-14T15:09:30Z Indexed on 2010/05/09 13:58 UTC
Read the original article Hit count: 286

Filed under:
|
|
|
|

In our application we are pulling data from a DB2 mainframe database. If the database has "low values" in a field, hibernate sends a "null" value in the object. This occurs even if the column is defined as "not null".

As we are doing XML parsing on this, Castor is having trouble with it. I would like to fix this in Hibernate. Also, all of the hibernate hbm files are generated, so we can't mess with them (they are regened from time to time.)

Any way to intercept all Strings and replace nulls with ""?

© Stack Overflow or respective owner

Related posts about db2

Related posts about java