We're updating the issue view to help you get more done. 

Inconsistent JOIN FETCH for standard entities and enhanced entities

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

. 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).

Environment

Windows 10, Java 8, Hibernate 5.2.13, Oracle (H2 for the test)

Status

Assignee

Unassigned

Reporter

Josef Maxa

Worked in

4.2.8

Components

Fix versions

Affects versions

5.2.13

Priority

Major