|
Ok, a couple of things. Is your problem really related to UUID? The constrained field is fullName. Are you saying that if you change to for example a long as id (changing generators accordingly) it works?
Also can you isolate the problem? There are really three things involved here - Hibernate Validator, Hibernate ORM and Spring Data. I am not convinced the problem lies with any of the Hibernate projects.
It also seems that your app is doing what it is supposed to do:
When I save an object with null or empty fullName via org.springframework.data.repository.CrudRepository in production or debug mode of application all is OK
This seems to imply that your test setup is wrong. Are you sure that data is actually written to the database on a organizationRepository.save(organization);. You might need to fush as well. Bean Validation is triggered when the write to the database occurs. From a JPA point of view a save just updates the persistence context, but nothing is written to the database. Not sure what the semantics are in Spring Data.
|