You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
An issue exists in the below versions of spring data and SDK whereby documents failing constraint validations are still persisted to Couchbase - despite these violations being picked up & printed to stderr.
Line 65 of ValidatingCouchbaseEventListener throws a new ConstraintViolationException when constraint violations are detected.
Further up the exception handling chain at line 186 of CouchbaseTemplateSupport the exception is swallowed and the stacktrace simply printed.
This allows the document to be saved to Couchbase even though it fails validation.
The exception should be propagated up the call chain to interrupt the save operation. This was the earlier behaviour in spring data 3.2.6.
Spring-Data: 4.2.4 (and 4.0.3)
Java SDK: 3.1.6
The text was updated successfully, but these errors were encountered:
@Bean
public LocalValidatorFactoryBean validator() {
return new LocalValidatorFactoryBean();
}
@Bean
public ValidatingCouchbaseEventListener validationEventListener() {
return new ValidatingCouchbaseEventListener(validator());
}
An issue exists in the below versions of spring data and SDK whereby documents failing constraint validations are still persisted to Couchbase - despite these violations being picked up & printed to stderr.
Line 65 of ValidatingCouchbaseEventListener throws a new ConstraintViolationException when constraint violations are detected.
Further up the exception handling chain at line 186 of CouchbaseTemplateSupport the exception is swallowed and the stacktrace simply printed.
This allows the document to be saved to Couchbase even though it fails validation.
The exception should be propagated up the call chain to interrupt the save operation. This was the earlier behaviour in spring data 3.2.6.
Spring-Data: 4.2.4 (and 4.0.3)
Java SDK: 3.1.6
The text was updated successfully, but these errors were encountered: