Reputation: 198198
I use hibernate 3.6, and found there are such annotations:
javax.persistence.Entity
org.hibernate.annotations.Entity
javax.persistence.Table
org.hibernate.annotations.Table
Why hibernate provides its own? Is it a replacement of jpa one, or just a complement? Should(Can) I use them both together, like:
@javax.persistence.Entity
@org.hibernate.annotations.Entity
public class User {}
Upvotes: 1
Views: 2909
Reputation: 603
org.hibernate.annotations.Entity extends javax.persistence.Entity with hibernate features.
see: http://docs.jboss.org/hibernate/core/3.6/javadocs/org/hibernate/annotations/Entity.html
Upvotes: 3