private void addToResults(Iterable<?> objects, Set<Class<?>> entityClasses) {
		if (objects == null) {
			return;
		}

		final Schema schema = context.getSchema();
		assert(schema != null);

		for (Class<?> entityClass : entityClasses) {
			final EntityDescriptor entityDescriptor = schema.getEntityDescriptor(entityClass);
			if (entityDescriptor == null) {
				throw new UnknownEntityDescriptorException(entityClass);
			}
	
			Property<?> pk = entityDescriptor.getPrimaryKey();
			assert(pk != null);
			for (Object obj : objects) {
				if (obj.getClass().equals(entityClass)) {
					objectGraph.addResult(entityClass, pk.read(obj), obj);
				}
			}
		}
	}