code: private void registerConstraintReport(Resource resource, InvalidContentException error) {
  		ConstraintReport report=
  			resource.
  				addConstraintReport(
  					error.getConstraints(),
  					new Date(),
  					currentRequest());
  		this.constraintReportRepository.add(report);
  		LOGGER.debug("Constraint validation failed. Registered constraint report {}",report.id());
  		error.setConstraintsId(report.id().failureId());
  	}
docs: TODO: How do we do this transactionally