A field annotated with
@Id is missing. 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
If you want simply a data transfer object to hold some data from the hibernate entity, use no annotations on it whatsoever – leave it a simple pojo.