Esempio n. 1
0
 @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();
 }
Esempio n. 2
0
  @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());
  }