[SERVER-2955] confusing shell output if a BSON field repeats Created: 15/Apr/11  Updated: 29/May/12  Resolved: 07/Oct/11

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

Type: Bug Priority: Trivial - P5
Reporter: Dwight Merriman Assignee: Antoine Girbal
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Operating System: ALL
Participants:

 Description   

it's possible, through human error etc., to have a bson object that has the same field repeat. if this happens i believe the shell won't show it correctly.

it may be hard to make the shell show these correctly. however they shouldn't show a "wrong" version and i think it is. it would be ok to just give an error instead. just don't want there to be confusion.



 Comments   
Comment by Antoine Girbal [ 07/Oct/11 ]

same things with v8, we cant detect error from code.
Unless there is a flag on engine that lets you change the tolerance level.
But I did quick search and cant see any.

Comment by Antoine Girbal [ 07/Oct/11 ]

at least in SM, there is no error thrown during object creation, so no way for us to catch it.
Most likely the engine is optimized to just overwrite without checking.
> a =

{a: 1, a: 2} { "a" : 2 }

Will try out with v8

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