@Override
public Object setValue(final Object entity, final Object newVal, MappingPolicy mappingPolicy) {
final PropertyContainer propertyContainer = template.getPersistentState(entity);
try {
if (newVal==null) {
propertyContainer.removeProperty(propertyName);
} else {
propertyContainer.setProperty(propertyName, newVal);
}
} catch(ConstraintViolationException cve) {
throw new DataIntegrityViolationException("Unique constraint violated "+property.getOwner().getName()+"."+property.getName()+" new value "+newVal,cve);