org.hibernate.annotations.Entity deprecated in Hibernate 4?

MTR picture MTR · Nov 2, 2011 · Viewed 41.3k times · Source

I am attempting to update to Hibernate 4 and I am getting that org.hibernate.annotations.Entity is deprecated. None of the documentation however seems to indicate that this is the case. Anyone have any insight into this?

@org.hibernate.annotations.Entity(dynamicUpdate = true)

Answer

tolitius picture tolitius · Nov 2, 2011

Yes it is deprecated in 4.0+:

Deprecate org.hibernate.annotations.Entity
Its individual attributes/values should become annotations. 
Schedule for removal in 4.1

You should use @DynamicUpdate instead

Here is a fixed JIRA talking about it.