Spring Boot JPA Repository Save not using @FutureOrPresent Validation on Entity Field

Whilst testing my Repository I have found that the @FutureOrPresent Annotation isn't taken account during save and ignores it, but on a find all it uses that annotation and refuses to load. The error I receive is below. The same also seems to apply to my @DateTimeFormat annotation when I change the date. I cannot work out why that would be the case?

javax.validation.ConstraintViolationException: Validation failed for classes [uk.co.nathanenglish.appointments.model.Appointment] during persist time for groups [javax.validation.groups.Default, ]

List of constraint violations:[

ConstraintViolationImpl{interpolatedMessage='must be a date in the present or in the future', propertyPath=end, rootBeanClass=class...

Read More »

By: StackOverFlow - Monday, 16 April

Related Posts