The Ultimate Guide on DB-Generated IDs in JPA Entities

According to the JPA specification, Entity is a Java class that meets the following requirements:

  1. Annotated with @Entity annotation
  2. Has no-args constructor
  3. Is not final
  4. Has an ID field (or fields) annotated with @Id 

As you can see, ID is required. Why is that?