[SERVER-7348] Warn if _id is an object with mutiple keys Created: 13/Oct/12  Updated: 15/Feb/13  Resolved: 13/Oct/12

Status: Closed
Project: Core Server
Component/s: Usability
Affects Version/s: None
Fix Version/s: None

Type: Improvement Priority: Major - P3
Reporter: Mathias Stearn Assignee: Unassigned
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Participants:

 Description   

It is usually a very bad idea. Among other reasons, in many languages, db.foo.save(db.foo.findOne()) might insert a new object rather than updating the existing one.

We will need some way to disable the warnings for the few cases where it is necessary, such as map-reduce output.

Maybe this is best handled by warning in the driver rather than the server.



 Comments   
Comment by Eliot Horowitz (Inactive) [ 13/Oct/12 ]

Its totally legitimated and used correctly by many people.

Generated at Thu Feb 08 03:14:16 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.