@Test public void testdoUpdate() { Query originalQuery = new Query(Criteria.where("_id").is("parent_idchild").and("someProperty").is("someValue")); Update update = new Update(); update.set("someProperty", "someNewValue"); boolean result = underTest.subDoc("studentSectionAssociation").doUpdate(originalQuery, update); assertTrue(result); originalQuery = new Query(Criteria.where("_id").is("parent_idchild").and("nonExistProperty").is("someValue")); update = new Update(); update.set("nonExistProperty", "someNewValue"); result = underTest.subDoc("studentSectionAssociation").doUpdate(originalQuery, update); assertFalse(result); }
public Location subDoc(String docType) { return locations.get(docType); }
SubDocAccessor { public Location subDoc(String docType) { return locations.get(docType); } }
SubDocAccessor { public Location subDoc(String docType) { return locations.get(docType); } SubDocAccessor(MongoTemplate template, UUIDGeneratorStrategy didGenerator,
                          INaturalKeyExtractor naturalKeyExtractor); }
SubDocAccessor { public Location subDoc(String docType) { return locations.get(docType); } SubDocAccessor(MongoTemplate template, UUIDGeneratorStrategy didGenerator,
                          INaturalKeyExtractor naturalKeyExtractor); LocationBuilder store(String type); Location createLocation(String type, String parentColl, Map<String, String> lookup, String subField); boolean isSubDoc(String docType); Location subDoc(String docType); static void main(String[] args); }
SubDocAccessor { public Location subDoc(String docType) { return locations.get(docType); } SubDocAccessor(MongoTemplate template, UUIDGeneratorStrategy didGenerator,
                          INaturalKeyExtractor naturalKeyExtractor); LocationBuilder store(String type); Location createLocation(String type, String parentColl, Map<String, String> lookup, String subField); boolean isSubDoc(String docType); Location subDoc(String docType); static void main(String[] args);  }