-
Notifications
You must be signed in to change notification settings - Fork 27
add expression support to QuerySet.update() #112
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
Conversation
@@ -342,12 +293,6 @@ def django_test_expected_failures(self): | |||
"delete_regress.tests.Ticket19102Tests.test_ticket_19102_select_related", | |||
"one_to_one.tests.OneToOneTests.test_o2o_primary_key_delete", | |||
}, | |||
"Cannot use QuerySet.update() when querying across multiple collections on MongoDB.": { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe we should keep this error message. Raising "Using a QuerySet in annotate() is not supported on MongoDB" isn't helpful for the user since this isn't what they're doing but rather what Django is doing behind the scenes (kind of... really this error message needs to be changed since Query
is used in more than just annotate()
).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok. yes, But the other test are going to be recategorized also?
spec.setdefault("$set", {})[field.column] = value | ||
return self.execute_update(spec) | ||
|
||
@wrap_database_errors |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We lost this decorator.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Who needs the safe net?! my bad. 😬 deleted by mistake.
39e15fd
to
a8ff458
Compare
6abb648
to
c6d4736
Compare
c6d4736
to
2d96786
Compare
Fixes #102