[JAVA-1167] Inserting documents validates against `{_id: null}` Created: 14/Apr/14 Updated: 02/Apr/16 Resolved: 13/Jun/14 |
|
| Status: | Closed |
| Project: | Java Driver |
| Component/s: | Write Operations |
| Affects Version/s: | 2.10.0 |
| Fix Version/s: | 2.12.1 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Daniel Gottlieb (Inactive) | Assignee: | Jeffrey Yemin |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||
| Backwards Compatibility: | Minor Change | ||||||||
| Description |
|
The java driver, by virtue of doing a null check on the `get("_id")` instead of a `containsField("_id")`, will try to set the `_id` to a new `ObjectId`. Not sure about all of the other drivers, but the javascript driver allows `null`. With respect to the use case of trying to replicate an existing collection, this causes a problem. In DBCollection.java:
|
| Comments |
| Comment by Jeffrey Yemin [ 31/Mar/15 ] |
|
Closing all resolved 3.0.0 issues, as 3.0.0 has been tagged and released. |
| Comment by Githook User [ 01/Aug/14 ] |
|
Author: {u'username': u'jyemin', u'name': u'Jeff Yemin', u'email': u'jeff.yemin@10gen.com'}Message: |
| Comment by Githook User [ 01/Aug/14 ] |
|
Author: {u'username': u'jyemin', u'name': u'Jeff Yemin', u'email': u'jeff.yemin@10gen.com'}Message: |
| Comment by Jeffrey Yemin [ 01/May/14 ] |
|
I think the way we're going to have to approach this so as not to break existing clients is to allow control over _id generation. So linking to |
| Comment by Githook User [ 28/Apr/14 ] |
|
Author: {u'username': u'jyemin', u'name': u'Jeff Yemin', u'email': u'jeff.yemin@10gen.com'}Message: |
| Comment by Jeffrey Yemin [ 28/Apr/14 ] |
|
Backing this change out as too risky for a patch release. |
| Comment by Githook User [ 25/Apr/14 ] |
|
Author: {u'username': u'jyemin', u'name': u'Jeff Yemin', u'email': u'jeff.yemin@10gen.com'}Message: |