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.
Problem can be verified/reproduced with Hibernate 5.0.9 - I don't have permission to update the ticket and include the affected version.
This problem is still alive with wildfly-10.1.0.Final + hibernate 5.0.10.Final version. Do you have any near future plan to solve this? Thanks so much!
I personally will not be tackling this until 6.0.
Attitude is one thing that will absolutely not help this move along. As far as where to look... I mean there is only one place in the codebase where EntityGraphs are applied and the exception stack trace shows you a great place to start looking.
Adding the stackoverflow reference here. I ran into this issue today while trying to make my application more performant by using the @EntityGraph. I will add an eager fetch annotation in my entity for now. Hoping that eventually I will not have to do that indiscriminately.
I'm also affected with this, trying to tune my Spring repositories with entity graphs as described by many articles. I have an entity with an `@Embedded` field, which has an `@ElementCollection` field and I'm trying to fetch the collection with a graph, e.g.
but I'm getting