@Override public MorphiaIterator<T, T> fetchEmptyEntities(final FindOptions options) { QueryImpl<T> cloned = cloneQuery(); cloned.getOptions().projection(new BasicDBObject(Mapper.ID_KEY, 1)); cloned.includeFields = true; return cloned.fetch(); }
@Override public MorphiaKeyIterator<T> fetchKeys(final FindOptions options) { QueryImpl<T> cloned = cloneQuery(); cloned.getOptions().projection(new BasicDBObject(Mapper.ID_KEY, 1)); cloned.includeFields = true; return new MorphiaKeyIterator<T>( ds, cloned.prepareCursor(options), ds.getMapper(), clazz, dbColl.getName()); }