code: public void addField(String fieldName) throws QueryException {
  		EReference feature = null;
  		for (TypeDef typeDef : types) {
  			if (typeDef.geteClass().getEStructuralFeature(fieldName) == null) {
  				throw new QueryException("Class \"" + typeDef.geteClass().getName() + "\" does not have the field \"" + fieldName + "\"");
  			}
  			if (feature == null) {
  				if (!(typeDef.geteClass().getEStructuralFeature(fieldName) instanceof EReference)) {
  					throw new QueryException(fieldName + " is not a reference");
  				}
  				feature = (EReference) typeDef.geteClass().getEStructuralFeature(fieldName);
  			} else {
  				if (feature != typeDef.geteClass().getEStructuralFeature(fieldName)) {
  					throw new QueryException("Classes \"" + typeDef.geteClass().getName() + "\" and \"" + feature.getEContainingClass().getName() + "\" have fields with the same name, but they are not logically the same");
  				}
  			}
  		}
  		if (fields == null) {
  			fields = new ArrayList<>();
  		}
  		fields.add(feature);
  	}
docs: Add the fields _after_ adding the types, because the fields will be checked against the types, all types should have the given field.
  
  @param fieldName
  @throws QueryException