You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Based on a question from a student I tried to replace javax.persistence.Entity with org.hibernate.annotations.Entity, and found that it wasn't being picked up by the AnnotationSessionFactoryBean. Since it is documented as an extension of j.p.Entity this seems rightfully unexpected, so it would be nice if it was picked up.
Good point, we need to check for that one explicitly, assuming that a class may be annotated with that special Hibernate entity annotation but no standard JPA stereotype...
This still seems broken to me using Spring nightly 3.0.0.CI-325 (7/11/2009). Beans marked as org.hibernate.annotations.Entity are still not mapped, while simply switching them to javax.persistence.Entity fixes the issue.
This bug has been shown as resolved but I seem to have hit upon this in my project. I have marked the Hibernate entity with @javax.persistence.Entity annotation and still the spring build is not picking it up. Running the project throws up the exception
org.hibernate.hql.ast.QuerySyntaxException: CountryDetail is not mapped [from CountryDetail]
where CountryDetail has been annotated with @Entity.
I don't have my test code anymore, but I didn't encounter this bug after the fix. In particular the fact that you mention having this problem with j.p.Entity makes me suspicious that something else is amiss in your situation. In other words, the CountryDetail class that you showed a snippet from can not suffer from this bug.
Iwein Fuld opened SPR-5787 and commented
Based on a question from a student I tried to replace javax.persistence.Entity with org.hibernate.annotations.Entity, and found that it wasn't being picked up by the AnnotationSessionFactoryBean. Since it is documented as an extension of j.p.Entity this seems rightfully unexpected, so it would be nice if it was picked up.
Affects: 2.5.6
Referenced from: commits a5c324f
The text was updated successfully, but these errors were encountered: