// handling nullability only if more explicit validation annotations do not exit.
if (!contains(annotations, NotNull.class) &&
(!LibraryUtils.HIBERNATE_VALIDATOR_IN_CLASSPATH || !contains(annotations, org.hibernate.validator.NotNull.class))) {
if (!manyToOne.optional()) {
PropertyValidationRule propertyRule = new PropertyValidationRule(descriptor.getName(), new NotNullValidationRule());
configuration.addPropertyRule(descriptor.getName(), propertyRule);
}
}
}