AttributeConverter not called when value is null

Description

Attribute converter not called when value is null.
For example :
If entity has boolean object and if the value is not set then it gets stored as null in data base irrespective of attribute converter mapping null value to "FALSE" . Other way round is also not happening. If value is null in database then value gets set to null.
Root cause: BasicBinder.bind method does not call doBind if value is null.

Environment

None

Activity

Show:
Etienne Miret
August 24, 2014, 10:05 PM

Pull request that fixes this bug, as well as which is closely related.

Driss Amri
March 18, 2015, 1:23 PM

Is there any progress on this issue? Does the pull request not suffice?

Gail Badner
March 18, 2015, 8:44 PM

I don't think the pull request as is really acceptable. As you already mentioned, your pull request breaks the contract for org.hibernate.type.descriptor.sql.BasicExtractor.

I will revisit this when I review Jiras related to attribute converters.

Steve Ebersole
March 19, 2015, 11:09 PM

Minor distinction... but this is not bug. The JPA spec does not say that null values need to be passed along to the AttributeCoverter. So y'all are asking for a change/improvement. I can certainly see benefit in passing along the nulls.

Gail Badner
April 15, 2015, 9:48 PM

Closing in preparation of releasing 4.3.9.Final and 4.2.19.Final.

Assignee

Steve Ebersole

Reporter

ananth

Fix versions

Labels

backPortable

None

Suitable for new contributors

None

Requires Release Note

None

Pull Request

None

backportDecision

None

Affects versions

Priority

Minor
Configure