[hibernate-dev] org.hibernate.AnnotationException: No identifier specified for entity

Stephen Fikes sfikes at redhat.com
Mon Mar 16 18:31:14 EDT 2015


https://docs.jboss.org/hibernate/orm/4.2/manual/en-US/html_single/#persistent-classes-pojo-identifier

The link above observes that the requirement to provide an identifier
for every entity is "... still not (yet) enforced" but "... should be
considered a deprecated feature as it will be completely required to
provide a identifier property in an upcoming release."

When using annotations, it seems to be required as far back as 3.3.2.GA.

Perhaps the requirement is not enforced when using hbm.xml ... but is
only for annotations.

Should we update the document comment to clarify?

Thanks!
Stephen



More information about the hibernate-dev mailing list