Unable to populate an ElementCollection (of an embeddable type) of an audited entity when the collection has a null value for a property with JoinColumn

Description

When there is a parent entity that has a List of an Embeddable object, and that Embeddable object defines a @JoinColumn, AuditReader fails to populate the List with the values if the property with the JoinColumn has not been set (is null). Test case to follow.

Test case:
https://github.com/cklab/hibernate-test-case-templates/tree/hhh11364/envers/envers-5

Activity

Show:

Former userJanuary 10, 2018 at 6:17 AM

Fixed in 5.1 branch as well.

CK LabJanuary 6, 2017 at 12:24 AM
Edited

@Chris Rebased and implemented your suggestions.

Chris CranfordJanuary 5, 2017 at 9:32 PM

, I updated the PR with some requested changes I'd like to see made.

CK LabDecember 30, 2016 at 12:34 AM

Looks like it's related to https://hibernate.atlassian.net/browse/HHH-8968. If the JoinColumn is not defined, we are doing a null = null check and not an IS NULL.

Fixed

Details

Assignee

Reporter

Fix versions

Affects versions

Priority

Created December 29, 2016 at 9:42 PM
Updated January 10, 2018 at 6:17 AM
Resolved January 10, 2018 at 6:17 AM

Flag notifications