[SERVER-21091] Document Validation should allow comparisson between attributes within a document Created: 23/Oct/15 Updated: 06/Dec/22 Resolved: 05/Dec/17 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Storage |
| Affects Version/s: | 3.2.0-rc0 |
| Fix Version/s: | None |
| Type: | Improvement | Priority: | Major - P3 |
| Reporter: | Andrew Morgan | Assignee: | Backlog - Query Team (Inactive) |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||
| Assigned Teams: |
Query
|
||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||
| Participants: | |||||||||
| Description |
|
The validation checks cannot compare one key's value against another (whether in the same or different documents). For example `{salary: {$gte: startingSalary}}` is not possible. Checks within the same document would be the priority. Checks against other documents (in the same or other collections) would also be useful. |
| Comments |
| Comment by Asya Kamsky [ 05/Dec/17 ] |
|
can be achieved using $expr in 3.6.0. |
| Comment by Asya Kamsky [ 05/Dec/17 ] |
|
Never mind, $expr can be used in document validation. |
| Comment by Asya Kamsky [ 05/Dec/17 ] |
|
Needs to be re-triaged. |
| Comment by Scott Hernandez (Inactive) [ 23/Oct/15 ] |
|
This query feature has already be requested: |