Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add check for _id for $set, $unset update operations #53

Closed
tatu-at-datastax opened this issue Jan 27, 2023 · 0 comments
Closed

Add check for _id for $set, $unset update operations #53

tatu-at-datastax opened this issue Jan 27, 2023 · 0 comments
Assignees

Comments

@tatu-at-datastax
Copy link
Contributor

tatu-at-datastax commented Jan 27, 2023

Neither $set nor $unset should allow modifying document's primary key (_id field).

Let's add validation for this case.

In addition, work to be done:

  1. Refactor handling of update operations out of DocumentUpdater, into separate operation implementations
  2. Improve validation of operators (indicate kind of failure, unknown vs unsupported)
  3. Allow cross-updater validation ($set and $unset cannot refer to same paths)
  4. Add tests for above.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant