-
-
Notifications
You must be signed in to change notification settings - Fork 98
Closed
Description
The element in the iterator will be null if the ID doesn't exist, but the iterator will say that there is an element.
NitriteBuilder builder = Nitrite.builder();
MVStoreModuleBuilder mvBuilder = MVStoreModule.withConfig();
MVStoreModule mvModule = mvBuilder.build();
builder.loadModule(mvModule);
Nitrite db = builder.openOrCreate();
try {
NitriteCollection items = db.getCollection("items");
Filter nameFilter = FluentFilter.where("name").eq("abc");
DocumentCursor nameCursor = items.find(nameFilter, null);
Iterator<Document> nameIter = nameCursor.iterator();
assertFalse("no document matching name.", nameIter.hasNext());
Filter idFilter = FluentFilter.where("_id").eq("0000000000000000000");
DocumentCursor idCursor = items.find(idFilter, null);
Iterator<Document> idIter = idCursor.iterator();
assertFalse("no document matching ID.", idIter.hasNext());
} finally {
db.close();
}
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
Done