To view this discussion on the web visit https://groups.google.com/d/msgid/mongodb-user/cba2a179-8cd2-4728-bb75-ad882f125451%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
To unsubscribe from this group and stop receiving emails from it, send an email to mongodb-user+unsubscribe@googlegroups.com.
To post to this group, send email to mongod...@googlegroups.com.
Visit this group at http://groups.google.com/group/mongodb-user.
To view this discussion on the web visit https://groups.google.com/d/msgid/mongodb-user/cba2a179-8cd2-4728-bb75-ad882f125451%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
If i upgrade to 2.6 , what are the possibilities of breaking the existing functionality in older mongodb version.
You need to hardcode to merge the subdocuments with MongoDB API. The code is unnatural and difficult to write. But you can solve the problem in esProc. The following is the code:
A1=MongoDB("mongo://localhost:27017/local?user=test&password=test")
A2=A1.find("c1",,"{_id:0}";"{name:1}")
A3= for A2;name
B3= A3.(acls.read.users|acls.append.users|acls.edit.users|acls.fullControl.users)
B4=new(A3.name:_id,B3.union().id():readUsers)
B5=B2=B2|B4See code explanation in https://dataccelerator.wordpress.com/2015/04/13/merge-mongodb-documents-in-esproc/ .