Closed mydeadlyvenoms closed 6 years ago
It's now always logged in BaseEntityService#persist()
. It's optionally also logged in BaseEntityService#update()
but only when persistence.xml
has explicitly enabled bean validation as below instead of relying on default value of AUTO
.
<property name="javax.persistence.validation.mode" value="CALLBACK" />
Very clean solution! Great idea to make it optional for updates via persistence.xml property.
Do you plan to merge the develop branch back into master to update the *-SNAPSHOT version of OmniPersistence? Or are there any blockers?
Snapshots are already automatically published to sonatype on every commit from development branch https://oss.sonatype.org/content/repositories/snapshots/org/omnifaces/omnipersistence/0.5-SNAPSHOT/
The master branch is only for release versions.
Ohww, sorry I missed the version bump.
It would be nice to have an option to log details about a
ConstraintViolation
. I guess there are different ways to solve it, before using OmniPersistence I did something like the following (first answer) inside an AbstractFacade - so the BaseEntityService might be the right place to solve it. https://stackoverflow.com/questions/12823000/bean-validation-constraints-violated-while-executing-automatic-bean-validation