[SERVER-35739] Object Constructor methods like ObjectId, UUID, Date do not work with a field parameter value with $addFields Created: 22/Jun/18 Updated: 14/Aug/18 Resolved: 17/Jul/18 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Aggregation Framework |
| Affects Version/s: | 3.6.5 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Edem Nsefik | Assignee: | Nick Brewer |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Operating System: | ALL |
| Steps To Reproduce: |
db.collection1.aggregate([
b) Date and a field with a date - it generates the same date value ignoring the date value in the field
db.coll1.find().forEach(function(results){ }) }) |
| Participants: |
| Description |
Failed to execute script. Error: invalid object id: length :
|
| Comments |
| Comment by Nick Brewer [ 17/Jul/18 ] |
|
This can be accomplished with the new type conversion operators introduced in MongoDB 4.0. Nick |
| Comment by Nick Brewer [ 22/Jun/18 ] |
Can you provide an example of this behavior?
What results did you receive? In general, it would be useful to get the specific commands you're running (including UUIDs, dates, etc), as well as the output you're receiving. Thanks, |