summaryrefslogtreecommitdiff
path: root/django/db/models
AgeCommit message (Collapse)Author
2020-07-28Fixed #31829 -- Used JSONField __contains lookup on key transforms.sage
2020-07-28Fixed #31836 -- Dropped support for JSONField __contains and __contained_by ↵Mariusz Felisiak
lookups on SQLite. The current implementation works only for basic examples without supporting nested structures and doesn't follow "the general principle that the contained object must match the containing object as to structure and data contents, possibly after discarding some non-matching array elements or object key/value pairs from the containing object".
2020-07-28Fixed #31835 -- Dropped support for JSONField __contains lookup on Oracle.Mariusz Felisiak
The current implementation works only for basic examples without supporting nested structures and doesn't follow "the general principle that the contained object must match the containing object as to structure and data contents, possibly after discarding some non-matching array elements or object key/value pairs from the containing object".
2020-07-24Fixed #31812 -- Fixed FileField.model for fields defined in abstract models.Matthias Kestenholz
Regression in a93425a37f4defdb31d4ca96bb3bf6da21f0b5ce.
2020-07-15Fixed #30446 -- Resolved Value.output_field for stdlib types.Simon Charette
This required implementing a limited form of dynamic dispatch to combine expressions with numerical output. Refs #26355 should eventually provide a better interface for that.
2020-07-14Refs #25425 -- Allowed unresolved Value() instances to be compiled.Simon Charette
Previously unresolved Value() instances were only allowed to be compiled if they weren't initialized with an output_field. Given the usage of unresolved Value() instances is relatively common in as_sql() overrides it's less controversial to add explicit support for this previously undefined behavior now and revisit whether or not it should be deprecated in the future.
2020-07-09Fixed #29789 -- Added support for nested relations to FilteredRelation.matt ferrante
2020-07-09Fixed #31773 -- Fixed preserving output_field in ExpressionWrapper for ↵Mariusz Felisiak
combined expressions. Thanks Thodoris Sotiropoulos for the report and Simon Charette for the implementation idea. Regression in df32fd42b84cc6dbba173201f244491b0d154a63.
2020-07-07Fixed #31767 -- Fixed QuerySet.none() on combined queryset.Mariusz Felisiak
2020-07-06Fixed #23797 -- Fixed QuerySet.exclude() when rhs is a nullable column.Jacob Walls
2020-07-06Fixed #31530 -- Added system checks for invalid model field names in ↵Hasan Ramezani
CheckConstraint.check and UniqueConstraint.condition.
2020-07-02Fixed #31758 -- Removed unneeded BytesToCharFieldConversionMixin.Sergey Fedoseev
Bug was fixed in mysqlclient 1.3.13.
2020-07-01Fixed #31755 -- Made temporal subtraction resolve output field.Sergey Fedoseev
2020-07-01Refs #28621 -- Fixed crash of annotations with nested OuterRef.Sergey Fedoseev
2020-06-30Fixed #31701 -- Made FileDescriptor subclass DeferredAttribute.alosultan
2020-06-30Fixed #28925 -- Fixed durations-only expressions crash on SQLite and MySQL.Sergey Fedoseev
This removes also unused DatabaseOperations.date_interval_sql().
2020-06-30Refs #28925 -- Simplified CombinedExpression.as_sql() a bit.Sergey Fedoseev
2020-06-29Fixed #31745 -- Added error messages when using ↵Hannes Ljungberg
UniqueConstraint.include/opclasses with deferrable.
2020-06-26Fixed #31742 -- Fixed makemigrations crash on ForeignKey to an app with ↵Mariusz Felisiak
mixed case label. Regression in 9e1b6b8a66af4c2197e5b1b41eb9dbb36e4f6502. Thanks Ignacio Santolin for the report.
2020-06-25Fixed #31596 -- Changed ForeignKey.validate() to use the base manager.Jon Dufresne
2020-06-17Refs #28077 -- Added opclasses to Index.__repr__().Mariusz Felisiak
This also removes unnecessary commas between attributes.
2020-06-16Refs #30446 -- Defined default output_field of text database functions.Simon Charette
This prevented the default behavior of BaseExpression._resolve_output_field from error'ing out when such functions accepted both expressions from mixed types (e.g. SubStr(CharField, IntegerField, IntegerField)).
2020-06-16Fixed #31702 -- Added support for PostgreSQL opclasses in UniqueConstraint.Hannes Ljungberg
2020-06-15Fixed #31706 -- Removed unnecessary getattr() call in FileDescriptor.__get__().Sultan
refresh_from_db() loads fields values.
2020-06-12Fixed #31659 -- Made ExpressionWrapper preserve output_field for combined ↵Mariusz Felisiak
expressions. Regression in df32fd42b84cc6dbba173201f244491b0d154a63. Thanks Simon Charette for the review.
2020-06-11Fixed #31667 -- Made __in lookup ignore None values.Adam Johnson
2020-06-10Fixed #31680 -- Removed unnecessary getattr() call in ↵alosultan
DeferredAttribute.__get__(). refresh_from_db() loads fields values.
2020-06-10Removed unnecessary list() call in ModelBase.__new__().SergBobrovsky
Unnecessary since 58ad030d05fa50cfed327368ab61defca3303e02.
2020-06-10Fixed #31657 -- Fixed ordering by attnames of self-referential ForeignKeys.Hasan Ramezani
2020-06-08Fixed #31664 -- Reallowed using non-expressions having filterable attribute ↵Nicolas Baccelli
as rhs in queryset filters. Regression in 4edad1ddf6203326e0be4bdb105beecb0fe454c4.
2020-06-08Fixed #31660 -- Fixed queryset crash when grouping by m2o relation.Mariusz Felisiak
Regression in 3a941230c85b2702a5e1cd97e17251ce21057efa. Thanks Tomasz Szymański for the report.
2020-06-05Fixed #31663 -- Made DecimalField.to_python() handle non-numeric invalid values.Sasha Pachev
2020-06-04Refs #30913 -- Added system checks for covering indexes and unique ↵Mariusz Felisiak
constraints support.
2020-06-04Fixed #30913 -- Added support for covering indexes on PostgreSQL 11+.Hannes Ljungberg
2020-06-03Fixed #31651 -- Made ExpressionWrapper use grouping columns from wrapped ↵Thodoris Sotiropoulos
expression.
2020-05-29Refs #21171 -- Made Collector.delete() rollback in the correct database.Simon Charette
Regression in c7dd8490b882b2cefdc7faf431dc64c532b79c9.
2020-05-27Fixed #31606 -- Allowed using condition with lookups in When() expression.Ryan Heard
2020-05-26Fixed #31614 -- Fixed aliases ordering by OrderBy() expressions of combined ↵Laurent Tramoy
queryset.
2020-05-25Fixed #31624 -- Avoided subquery usage on QuerySet.all().delete().Simon Charette
Thanks Adam Johnson for the report. Regression in 7acef095d73322f45dcceb99afa1a4e50b520479.
2020-05-21Fixed #30375 -- Added FOR NO KEY UPDATE support to ↵Manuel Weitzman
QuerySet.select_for_update() on PostgreSQL.
2020-05-20Fixed #31410 -- Added system checks for invalid model field names in ↵Hasan Ramezani
UniqueConstraint.
2020-05-19Fixed #31607 -- Fixed evaluated Subquery equality.Mariusz Felisiak
Regression in 691def10a0197d83d2d108bd9043b0916d0f09b4.
2020-05-14Fixed #31584 -- Fixed crash when chaining values()/values_list() after ↵Mariusz Felisiak
Exists() annotation and aggregation on Oracle. Oracle requires the EXISTS expression to be wrapped in a CASE WHEN in the GROUP BY clause. Regression in efa1908f662c19038a944129c81462485c4a9fe8.
2020-05-14Fixed #31568 -- Fixed alias reference when aggregating over multiple subqueries.Simon Charette
691def10a0197d83d2d108bd9043b0916d0f09b4 made all Subquery() instances equal to each other which broke aggregation subquery pushdown which relied on object equality to determine which alias it should select. Subquery.__eq__() will be fixed in an another commit but Query.rewrite_cols() should haved used object identity from the start. Refs #30727, #30188. Thanks Makina Corpus for the report.
2020-05-14Fixed #31566 -- Fixed aliases crash when chaining values()/values_list() ↵Simon Charette
after annotate() with aggregations and subqueries. Subquery annotation references must be resolved if they are excluded from the GROUP BY clause by a following .values() call. Regression in fb3f034f1c63160c0ff13c609acd01c18be12f80. Thanks Makina Corpus for the report.
2020-05-13Fixed #31580 -- Added error messages on distinct() following union(), ↵Hasan Ramezani
intersection(), and difference().
2020-05-11Refs #30116 -- Simplified regex match group access with Match.__getitem__().Jon Dufresne
The method has been available since Python 3.6. The shorter syntax is also marginally faster.
2020-05-11Optimized Model and QuerySet pickling version comparison.Adam Johnson
2020-05-08Fixed #12990, Refs #27694 -- Added JSONField model field.sage
Thanks to Adam Johnson, Carlton Gibson, Mariusz Felisiak, and Raphael Michel for mentoring this Google Summer of Code 2019 project and everyone else who helped with the patch. Special thanks to Mads Jensen, Nick Pope, and Simon Charette for extensive reviews. Co-authored-by: Mariusz Felisiak <felisiak.mariusz@gmail.com>
2020-05-05Fixed #31538 -- Fixed Meta.ordering validation lookups that are not transforms.Mariusz Felisiak
Regression in 440505cb2cadbe1a5b9fba246bcde6c04f51d07e. Thanks Simon Meers for the report.