@Override
    public CloseableIterator<K> iterate() {
        final DBCursor cursor = createCursor();
        return new CloseableIterator<K>() {
            @Override
            public boolean hasNext() {
                return cursor.hasNext();
            }

            @Override
            public K next() {
                return transformer.apply(cursor.next());
            }

            @Override
            public void remove() {
            }

            @Override
            public void close() {
            }
        };
    }
Iterate with the specific fields

@param paths fields to return
@return iterator
querydsl-mongodb/src/main/java/com/querydsl/mongodb/AbstractMongodbQuery.java