Uploaded image for project: 'Hibernate ORM'
  1. HHH-12718

Entity changes in @PreUpdate callback are not persisted when lazy loading is active for more than one field

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 5.2.17, 5.3.1
    • Fix Version/s: 5.3.3, 5.4.0.CR1
    • Component/s: hibernate-core
    • Labels:
      None

      Description

      We are using Hibernate 5.2.17 in our project and populate the last modification date within a @PreUpdate entity callback.

      After a lengthy debugging session it seems like that when

      1. Bytecode enhancement for lazy loading is active
      2. Multiple entity fields are loaded lazily the changes done to the entity within the callback are not persisted on database level.

      PR with Test Case: https://github.com/hibernate/hibernate-orm/pull/2361

        Attachments

          Activity

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: