From Hibernate Getting Started Guide :
The @javax.persistence.Entity
annotation is used to mark a class as
an entity. It functions the same as the class mapping element
discussed in Section 2.3, "The mapping file". Additionally the
@javax.persistence.Table
annotation explicitly specifies the table
name. Without this specification, the default table name would be
EVENT).
Since org.hibernate.annotations.Entity has been deprecated you should use the Java EE annotation. Also, as tolitius already mentioned, for the annotation configurations of @org.hibernate.annotations.Entity
, you should use the respective annotation, e.g. @DynamicUpdate
.
Hope that helps.
Note: Event
is the name of the class that is annotated in the example, this is why it states "default table name would be EVENT".