Embedded NamedAttributeNode not supported in NamedEntityGraph

Description

I'm trying to deploy an app to Wildfly 8.1.0 (Hibernate 4.3.5), but Hibernate AttributeNodeImpl is throwing an exception - "Attribute x is not a managed type". I looked at the code and it's checking for Basic or Embedded annotation on lines 123-128 and throwing an exception if found.

My attribute is Embedded. According to JPA spec, Entity, MappedSuperclass and Embeddable are all managed types. Also, online resources and the book "Pro JPA 2" provide examples of Entity Graphs with Embedded attribute nodes.

I've attached two classes which should reproduce the issue.

Environment

Wildfly 8.1.0

Status

Assignee

Unassigned

Reporter

John Schneider

Fix versions

None

Labels

backPortable

None

Suitable for new contributors

None

Requires Release Note

None

Pull Request

None

backportDecision

None

Affects versions

4.3.5
5.0.3

Priority

Major