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

Minimongo throws error when $setting a nested _id field #1794

Closed
aldeed opened this issue Jan 28, 2014 · 1 comment
Closed

Minimongo throws error when $setting a nested _id field #1794

aldeed opened this issue Jan 28, 2014 · 1 comment

Comments

@aldeed
Copy link
Contributor

@aldeed aldeed commented Jan 28, 2014

This error is in master and current devel.

Minimongo throws an error when $setting a nested _id field (for example, something._id), but I think it should only complain about top level _id.

To reproduce, in client code:

Test = new Meteor.Collection("test");
Test.insert({}, function (e, r) {
  if (!e) {
    Test.update({_id: r}, {$set: {'something._id': "1234"}}, function (e, r) {

    });
  }
});
@glasser glasser closed this in fb9592a Feb 18, 2014
@glasser
Copy link
Member

@glasser glasser commented Feb 18, 2014

Thanks!

glasser added a commit that referenced this issue Feb 18, 2014
Disallow any mod on (top-level) _id, not just $sets that change the _id.

Fixes #1794.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.