Updating a legacy Hibernate 4 to latest 5.4.15 version resulted in an odd exception when saving the audit record for a record. Turning up the debugging reveals that the actual save of the record appears to proceed correctly, and then when envers begins to save it's audit entry, the Lazy initialization exception occurs. If the lazy “Owner” field is changed to be @NotAudited , the save works.
Save RelatedToTaskEntity cascades to save TaskEntity, which then moves onto the Owner entity where the exception occurs. I looked at but toggling the proxy compliance mode didn't seem to effect it. Hibernate 5.4.1 and 5.4.10 work, it appears to have broken in 5.4.11. Looking through the release notes, maybe is related?
RelatedToTaskEntity
@Table(name = "RELATED_TO_TASK") @Audited @Entity public class RelatedToTaskEntity extends BaseDO<Integer> {
Updating a legacy Hibernate 4 to latest 5.4.15 version resulted in an odd exception when saving the audit record for a record. Turning up the debugging reveals that the actual save of the record appears to proceed correctly, and then when envers begins to save it's audit entry, the Lazy initialization exception occurs. If the lazy “Owner” field is changed to be @NotAudited , the save works.
Save RelatedToTaskEntity cascades to save TaskEntity, which then moves onto the Owner entity where the exception occurs. I looked at but toggling the proxy compliance mode didn't seem to effect it. Hibernate 5.4.1 and 5.4.10 work, it appears to have broken in 5.4.11. Looking through the release notes, maybe is related?
RelatedToTaskEntity
TaskEntity
UserInfoEntity