I spent a bit of time figuring out what all the annotations for a Hibernate/JPA @Id field should be, and wanted to document it. First up, with any entity, you need to add an @Id annotation to a field, I typically use a Long field.
elegant » being unusually effective and simple… do » the way.
I spent a bit of time figuring out what all the annotations for a Hibernate/JPA @Id field should be, and wanted to document it. First up, with any entity, you need to add an @Id annotation to a field, I typically use a Long field.