Details
-
Type:
Improvement
-
Status:
Closed
-
Priority:
Major
-
Resolution: Fixed
-
Labels:None
-
Patch Submitted:Yes
-
Patch attached:Yes
Description
Multi Parameter in Update Method
Hi Hasan, thanks for your commit. I applied the code and wrote tests for it. It turned out there was a bug in morphia, update should always update all matched instances: http://code.google.com/p/morphia/issues/detail?id=247
I added an updateFirst method in case only one entity should be updated (see also morphia api: http://morphia.googlecode.com/svn/site/morphia/apidocs/com/google/code/morphia/Datastore.html#updateFirst%28com.google.code.morphia.query.Query,%20com.google.code.morphia.query.UpdateOperations,%20boolean,%20com.mongodb.WriteConcern%29)