[GODRIVER-660] _id should be prepended, not appended Created: 28/Nov/18  Updated: 28/Oct/23  Resolved: 04/Jan/19

Status: Closed
Project: Go Driver
Component/s: CRUD
Affects Version/s: None
Fix Version/s: 0.2.0

Type: Bug Priority: Major - P3
Reporter: Jeffrey Yemin Assignee: Kristofer Brandow (Inactive)
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Duplicate
is duplicated by GODRIVER-582 ensureID should return consistent types Closed

 Description   

Server engineering team recommends that for performance reasons the _id field should be the first one in any document being inserted.  Currently auto-generated _id fields are appended rather than prepended, making them the last field instead of first.



 Comments   
Comment by Githook User [ 04/Jan/19 ]

Author:

{'username': 'skriptble', 'email': 'kris@mongodb.com', 'name': 'Kris Brandow'}

Message: Ensure _id is always first in inserted documents

GODRIVER-660

Change-Id: Ieed0294e8447d50fd49b00551d064522994260f7
Branch: master
https://github.com/mongodb/mongo-go-driver/commit/5514df920614a2ffba26ec3539d8509e8ad2344e

Comment by Kristofer Brandow (Inactive) [ 20/Dec/18 ]

Code Review: https://review.gerrithub.io/c/mongodb/mongo-go-driver/+/437983.

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