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

Inconsistent JOIN FETCH for standard entities and enhanced entities

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 5.2.13
    • Fix Version/s: 5.3.1
    • Component/s: hibernate-core
    • Labels:
      None
    • Environment:
      Windows 10, Java 8, Hibernate 5.2.13, Oracle (H2 for the test)
    • Bug Testcase Reminder (view):

      Bug reports should generally be accompanied by a test case!

    • Worked in:
    • Last commented by a user?:
      true
    • Sprint:

      Description

      JOIN FETCH for standard (non bytecode enhanced entities) fetches initialized entities.
      The domain graph can be fully accessed outside a session.

      JOIN FETCH for bytecode enhanced entities fetches not initialized entities and throws LazyInitializationException.
      The domain graph accessed outside a session throws LazyInitializationException.

      I attached a test test.zip . JPAHibernateJoinTest.
      Errors out with byte code enhacement enabled (default - uncommented build section in main pom.xml).
      Works fine without (comment build section in main pom.xml).

        Attachments

          Issue links

            Activity

              People

              • Votes:
                1 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: