Problem :
org.hibernate.AnnotationException: No identifier specified for entity:
Solution:
You are missing a field annotated with @Id.
Each @Enitity needs an @Id - this is the primary key in the database.
If you don't want your entity to be persisted in a separate table, but rather be a part of other entities, you can use @Embeddable instead of @Entity.
No comments:
Post a Comment