@Override
protected void check(MappedClass mc, MappedField mf, Set<ConstraintViolation> ve) {
if (mf.hasAnnotation(Reference.class)) {
Class realType = (mf.isSingleValue()) ? mf.getType() : mf.getSubClass();
if (realType == null) throw new MappingException("Type is null for this MappedField: " + mf);
if ((!realType.isInterface() && mc.getMapper().getMappedClass(realType).getIdField() == null))
ve.add(new ConstraintViolation(Level.FATAL, mc, mf, this.getClass(), mf.getFullName() + " is annotated as a @"
+ Reference.class.getSimpleName() + " but the " + mf.getType().getName()
+ " class is missing the @" + Id.class.getSimpleName() + " annotation"));