| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
on_delete for ForeignKey/OneToOneField
|
|
|
|
| |
custom queryset args.
|
|
|
|
| |
default manager
|
| |
|
|
|
|
|
|
|
| |
managers in migration
Thanks to Shai Berger, Loïc Bistuer, Simon Charette, Andrew Godwin,
Tim Graham, Carl Meyer, and others for their review and input.
|
|
|
|
|
|
| |
packages.
This is a reliqua from the early days of the modeltests/regressiontests era.
|
|
|
|
| |
test package.
|
|
|
|
|
|
|
| |
It contained models, forms and admin objects causing undesirable
import side effects. Refs #16368.
Thanks to Ramiro, Carl and Loïc for the review.
|
|
|
|
| |
Refs #21169
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
default filtering
The `remove()` and `clear()` methods of the related managers created by
`ForeignKey`, `GenericForeignKey`, and `ManyToManyField` suffered from a
number of issues. Some operations ran multiple data modifying queries without
wrapping them in a transaction, and some operations didn't respect default
filtering when it was present (i.e. when the default manager on the related
model implemented a custom `get_queryset()`).
Fixing the issues introduced some backward incompatible changes:
- The implementation of `remove()` for `ForeignKey` related managers changed
from a series of `Model.save()` calls to a single `QuerySet.update()` call.
The change means that `pre_save` and `post_save` signals aren't called anymore.
- The `remove()` and `clear()` methods for `GenericForeignKey` related
managers now perform bulk delete so `Model.delete()` isn't called anymore.
- The `remove()` and `clear()` methods for `ManyToManyField` related
managers perform nested queries when filtering is involved, which may
or may not be an issue depending on the database and the data itself.
Refs. #3871, #21174.
Thanks Anssi Kääriäinen and Tim Graham for the reviews.
|
|
|
|
| |
Signed-off-by: Jason Myers <jason@jasonamyers.com>
|
|
|
|
| |
relations.
|
|
|
|
|
|
|
| |
BooleanField does not have a default value
Thanks to Collin Anderson for the suggestion and Tim Graham for
reviewing the patch.
|
|
|
|
|
|
|
|
|
|
|
| |
Additionally this patch solves the orthogonal problem that specialized
`QuerySet` like `ValuesQuerySet` didn't inherit from the current `QuerySet`
type. This wasn't an issue until now because we didn't officially support
custom `QuerySet` but it became necessary with the introduction of this new
feature.
Thanks aaugustin, akaariai, carljm, charettes, mjtamlyn, shaib and timgraham
for the reviews.
|
|
|
|
| |
the methods that return a QuerySet.
|
|
|