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

disableValidation causes className to go in update params [moved] #379

Closed
jyemin opened this issue Apr 25, 2013 · 1 comment
Closed

disableValidation causes className to go in update params [moved] #379

jyemin opened this issue Apr 25, 2013 · 1 comment
Labels
Milestone

Comments

@jyemin
Copy link
Contributor

jyemin commented Apr 25, 2013

This is Issue 379 moved from a Google Code project.
Added by 2012-02-16T00:44:15.000Z by [email protected].
Please review that bug for more context and additional comments, but update this bug.

Original labels: Type-Defect, Priority-Low

Original description

What version are you using? morphia-0.99.1-SNAPSHOT.jar / mongo 2.0.1

Doing an update w/ disableValidation causes the update to get the className parameter inserted.

For example, this code

Notification notification = new Notification("xyz");
Query<User> query = createQuery().field("_id").equal(user.getId());
UpdateOperations<User> ops = createUpdateOperations().disableValidation()
    .removeAll("notifications", notification);
UpdateResults<User> results = update(query, ops);

gives this mongo statement:

{ $pull: { notifications: { className: "com.example", abc: "xyz" } } }

however, this code:

Notification notification = new Notification("xyz");
Query<User> query = createQuery().field("_id").equal(user.getId());
UpdateOperations<User> ops = createUpdateOperations()
    .removeAll("notifications", notification);
UpdateResults<User> results = update(query, ops);

gives this mongo statement:

{ $pull: { notifications: { abc: "xyz" } } } 
@evanchooly evanchooly added this to the post-1.0 milestone Jun 5, 2014
@evanchooly
Copy link
Member

Doesn't seem terribly pressing. Bumping to post-1.0.

@evanchooly evanchooly removed this from the post-1.0 milestone Jan 14, 2016
@evanchooly evanchooly modified the milestone: 1.3.0 Jun 13, 2016
@evanchooly evanchooly added the bug label Jul 20, 2016
@evanchooly evanchooly modified the milestones: 1.3.0, 1.3.1 Oct 10, 2016
@evanchooly evanchooly modified the milestones: 1.3.0, 1.3.1 Oct 25, 2016
evanchooly pushed a commit that referenced this issue Oct 26, 2016
evanchooly pushed a commit that referenced this issue Oct 26, 2016
evanchooly pushed a commit that referenced this issue Oct 28, 2016
@evanchooly evanchooly mentioned this issue Oct 28, 2016
evanchooly pushed a commit that referenced this issue Oct 31, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
2 participants