code: private Set<Resource> fetchRelationFromEntity(IncludeRequest request, List<Resource> sourceResources, ResourceField
  			relationshipField, boolean allowLookup, boolean fetchRelatedEntity, boolean mustInclude) {
  		Set<Resource> loadedResources = new HashSet<>();
  		for (Resource sourceResource : sourceResources) {
  			ResourceIdentifier id = sourceResource.toIdentifier();
  
  			Object sourceEntity = request.getEntity(id);
  			if (sourceEntity != null && !(sourceEntity instanceof Resource)) {
  
  				Object relatedEntity = null;
  				if (fetchRelatedEntity) {
  					relatedEntity = relationshipField.getAccessor().getValue(sourceEntity);
  					if (!allowLookup && Iterable.class.isAssignableFrom(relationshipField.getType()) && relatedEntity == null) {
  						// note that single-valued relations are allowed to be null
  						throw new InternalServerErrorException(
  								id + " relationship field collection '" + relationshipField.getJsonName()
  										+ "' can not be null. Either set the relationship as an empty "
  										+ Iterable.class.getCanonicalName() + " or use LookupIncludeBehavior.AUTOMATICALLY_ALWAYS");
  					}
  				}
  
  				// attempt to work with full relationship and fallback to relationshipId where possible
  				if (relatedEntity != null) {
  					List<Resource> relatedResources =
  							request.setupRelation(sourceResource, relationshipField, relatedEntity);
  					loadedResources.addAll(relatedResources);
  				} else if (relationshipField.hasIdField()) {
  					Object relatedEntityID = relationshipField.getIdAccessor().getValue(sourceEntity);
  					request.setupRelationId(sourceResource, relationshipField, relatedEntityID);
  					if (fetchRelatedEntity && relatedEntityID != null && !allowLookup && mustInclude) {
  						throw new IllegalStateException("inconsistent relationship '" + relationshipField.getUnderlyingName()
  								+ "' for " + id + ", id "
  								+ "set to " + relatedEntityID + ", but related object is null and lookup disabled");
  					}
  				}
  			}
  		}
  		return loadedResources;
  	}
docs: No lookup specified for the field. Attempt to load relationship from
  original POJOs. Throw an InternalServerErrorException if the field is an
  Iterable and null.