Details
-
Type:
Improvement
-
Status:
Closed
-
Priority:
Major
-
Resolution: Fixed
-
Labels:None
-
Patch Submitted:Yes
-
Patch attached:Yes
Description
Multi Parameter in Update Method
Activity
Hasan Ozgan
made changes -
| Field | Original Value | New Value |
|---|---|---|
| Attachment | multi-update-params.patch [ 16609 ] |
Hasan Ozgan
made changes -
| Attachment | UrbanVille Technical Design Document.mm [ 16608 ] |
Juri Kuehn
made changes -
| Resolution | Fixed [ 1 ] | |
| Status | Open [ 1 ] | Closed [ 6 ] |
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)