IllegalArgumentException is thrown during two phase load's plan creation for member relation (i.e. ManyToMany). While resolving relation, MetamodelGraphWalker visits each attribute of target entity type and checks whether fetchgraph or loadgraph has directed to eagerly fetch that attribute. If so, it modifies load plan. Recent changes in 5.4.0 uses contracts specified by JPA 2.0 to walk down and manage types. getAttribute(name) contract specified by JPA's ManagedType throws IllegalArgumentException when asked attribute named as 'name' is not found. But as per Hibernate's implementation, this contract is being used to check and modify load plan if attribute matches with specified EntityGraph. Please find test case in attachment. |