I implemented an AttributeConverter which returned an empty string on all deserialized null values because Oracle stores null values instead of empty strings.
Although the converter gets called by BasicExtractor.extract, the result is thrown away afterwards because the result set was flagged with wasNull().
I think the bug is related to but it is more the other way round.
The testcase tests that the Converter shall replace <null> with an empty String on reading from the database.
This does not happen. The converter itself is called.
Note: also affects 4.3.6
Awesome, thank you for the test case!
Pull request that fixes this bug, as well as HHH-8697.
Warning: This PR breaks the contract for org.hibernate.type.descriptor.sql.BasicExtractor! It doesn’t check anymore for rs.wasNull(), which means subclass must return null when appropriate instead of a default value. I fixed all subclasses within hibernate-core, but I don’t know whether there are some others outside.
Closing in preparation of releasing 4.3.9.Final and 4.2.19.Final.