When i am doing sample Hibernate standalone program, little bit confusing was created in my mind with the usage of @Entity annotation.
Here my question is, I have one persisted class with @Entity from javax.persistence package then it's working fine but when i replaced @Entity annotation with Hibernate API(i.e from org.hibernate.annotations package) then it's giving org.hibernate.MappingException: Unknown entity: com.jetti.test.Employee
Give some more explanation are highly appreciated.
@javax.persistence.Entity is still mandatory, @org.hibernate.annotations.Entity is not a replacement.
So, hibernate's @Entity
just complements the javax.persistence.Entity
, and gives a few more fine tuning options.