[SERVER-15367] Look for empty BSONTimestamp after "_class" field Created: 24/Sep/14 Updated: 24/Sep/14 Resolved: 24/Sep/14 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Improvement | Priority: | Major - P3 |
| Reporter: | John Butler | Assignee: | Unassigned |
| Resolution: | Cannot Reproduce | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Participants: |
| Description |
|
When using Spring Data to insert an Object, Spring Data will ALWAYS assign "_class" as the first field of the DBObject. This precludes the ability to insert a BSONTimestamp at the beginning of a DBObject to allow it to be populated server-side. The ability to assign a timestamp value server-side is critical to our application (because we have multiple clients running concurrently). The limitation of only looking at the first field (after "_id") prevents the ability to use Spring Data. |
| Comments |
| Comment by Ramon Fernandez Marina [ 24/Sep/14 ] | ||||
|
dancerjohn, thanks for your report. This behavior is new in the 2.6 series, so I've opened Regards, | ||||
| Comment by John Butler [ 24/Sep/14 ] | ||||
|
Documentation on this page should be updated: http://docs.mongodb.org/manual/reference/bson-types/ | ||||
| Comment by John Butler [ 24/Sep/14 ] | ||||
|
In which version was this change made? | ||||
| Comment by Scott Hernandez (Inactive) [ 24/Sep/14 ] | ||||
|
In my test I can't reproduce this with the current version (which now checks all top-level fields on insert):
Also, this is best addressed in your client as the server has clear definition on expected behavior. |