-
Type: Bug
-
Resolution: Done
-
Priority: Trivial - P5
-
None
-
Affects Version/s: 3.3.4
-
Component/s: Querying
-
None
-
ALL
-
I have inserted a document with duplicate field name. While find, it is not giving both field. it is giving the last field only. This may mislead to the developers. If it is not giving the both fields then it should not allow to insert duplicate fields.
db.myCol.insert(
{visitor_id:1,name:"hello",name:"hello1"})
Query1-
db.myCol.find(
)
result--
Query2-db.myCol.find(
{visitor_id:1,name:"hello"})
result--
None
Query3- db.myCol.find(
)
result--
So in either of the query only last field(from duplicate) appears. Why is it not showing both the fields?
- related to
-
SERVER-6439 Duplicate fields at the same level should not be allowed
- Backlog