docs: public boolean apply(final MappedClass mappedClass, final MappedField mappedField, final Object value,
                           final List<ValidationFailure> validationFailures) {
          if (appliesTo(mappedClass, mappedField)) {
              Class classOfValue = value.getClass();
              Class classOfIdFieldForType = mappedClass.getMappedIdField().getConcreteType();
              if (!mappedField.getType().equals(classOfValue) && !classOfValue.equals(classOfIdFieldForType)) {
                  validationFailures.add(new ValidationFailure(format("The value class needs to match the type of ID for the field. "
                                                                      + "Value was %s and was a %s and the ID of the type was %s",
                                                                      value, classOfValue, classOfIdFieldForType)));
              }
              return true;
          }
          return false;
      }