Hibernate @GeneratedValue

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.

Published
Categorized as Uncategorized Tagged

Hibernate Validation

Here’s a list of annotations that you can use to validate java beans: @Length(min=, max=) Checks whether the string length matches the range @Max(value=) Checks that the value is less than or equal to the max @Min(value=) Checks that the value is greater than or equal to the min @NotNull Checks that the value is… Continue reading Hibernate Validation

Published
Categorized as Uncategorized Tagged