private List<Object> listOfEntities(SessionImplementor session, Type[] resultTypes, ClosableIterator<Tuple> tuples) {
List<Object> results = new ArrayList<Object>();
Class<?> returnedClass = resultTypes[0].getReturnedClass();
while ( tuples.hasNext() ) {
Tuple tuple = tuples.next();
OgmLoader loader = createLoader( session, returnedClass );
results.add( entity( session, tuple, loader ) );
}
return results;
}