Can't add attribute node declared in superclass (inheritance) in EntityGraph

Description

The following code throws IllegalArgumentException:

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 @Entity public class Employee { @Id @GeneratedValue public long ind; @ManyToMany Set<Manager> managers = new HashSet<>(); @ManyToMany Set<Employee> friends = new HashSet<>(); } @Entity @NamedEntityGraph( name="managerfriends", includeAllAttributes=false, attributeNodes = { @NamedAttributeNode(value='friends') } ) public class Manager extends Employee { }

If includeAllAttributes=true, it works because EntityGraph will include attributes owned by superclass.

Environment

None

Status

Assignee

Brett Meyer

Reporter

Jocki Hendry

Fix versions

Labels

None

backPortable

None

Suitable for new contributors

None

Requires Release Note

None

backportDecision

None

Components

Affects versions

4.3.4

Priority

Major