summaryrefslogtreecommitdiff
path: root/django/db/models
AgeCommit message (Collapse)Author
2015-06-04Fixed #24677 -- Made TextField.to_python() return a string.Rolo
This is consistent with CharField.
2015-06-02Fixed #24866 -- Added Now() database functionAdam Chainz
2015-06-02Fixed #24831 -- Fixed pickling queryset with prefetch_related() after ↵Andriy Sokolovskiy
deleting objects.
2015-06-02Fixed #9596 -- Added date transform for DateTimeField.Jon Dufresne
2015-05-30Fixed #24699 -- Added aggregate support for DurationField on OracleJosh Smeaton
2015-05-25Fixed #24835 -- Fixed QuerySet.exists() after an annotation with Count()Paweł Marczewski
QuerySet.exists() incorrectly handled query.group_by = True case (grouping by all select fields), causing GROUP BY expressions to be wiped along with select fields.
2015-05-22Fixed #16891 -- Made Model/QuerySet.delete() return the number of deleted ↵Alexander Sosnovskiy
objects.
2015-05-20Fixed #24705 -- Fixed negated Q objects in expressions.Anssi Kääriäinen
Avoided split_exclude() for Q when used as an expression.
2015-05-19Fixed #24818 -- Prevented models.CharField from accepting a string as max_lengthAlasdair Nicol
2015-05-17Renamed value_to_db_xxx to adapt_xxxfield_value.Aymeric Augustin
This mirrors convert_xxxfield_value nicely, taking advantage of the adapter/converter terminology which is commonly used by DB-API modules.
2015-05-17Removed global timezone-aware datetime adapters.Aymeric Augustin
Refs #23820. Fixed #19738. Refs #17755. In order not to introduce a regression for raw queries, parameters are passed through the connection.ops.value_to_db_* methods, depending on their type.
2015-05-16Removed redundant list() calls.Tim Graham
2015-05-13Removed unnecessary arguments in .get method callsPiotr Jakimiak
2015-05-12Fixed #24105 -- Called Storage.get_valid_name() when upload_to is callableAbhaya Agarwal
2015-05-12Fixed #24156 -- Fixed inherited related name of ManyToManyField.Andriy Sokolovskiy
Fixed situation when parent abstract model declares related_name='+', and child models had an invalid queryset.
2015-05-11Fixed #24748 -- Fixed incorrect GROUP BY on MySQL in some queriesAnssi Kääriäinen
When the query's model had a self-referential foreign key, the compiler.get_group_by() code incorrectly used the self-referential foreign key's column (for example parent_id) as GROUP BY clause when it should have used the model's primary key column (id).
2015-05-11Fixed #24766 -- Added join promotion for Case expressionsAnssi Kääriäinen
2015-05-11Removed redundant removal of hyphens in UUIDField.Matt Robenolt
2015-05-08Fixed #24758 -- Corrected Options.get_fields() docstring.Tim Graham
2015-05-06Fixed #24708 -- Handled non-string values in GenericIPAddressField.to_python()Pradeek
2015-05-05Fixed #24752 -- query crash when reusing Case expressionsAnssi Kääriäinen
Case expressions weren't copied deep enough (self.cases list was reused resulting in an error).
2015-05-02Fixed #24693 -- Added label and label_lower property to Model._metaLuis Del Giudice
2015-04-28Fixed #24719 -- Restored the ability to use interators as queryset related ↵Aric Coady
object filters.
2015-04-25Fixed #24649 -- Allowed using Avg aggregate on non-numeric field types.Tim Graham
2015-04-20Fixed #24654 -- Based ordering circular references detection on columns.Simon Charette
Thanks to Elmar Bucher for the report and Tim for the review.
2015-04-20Fixed #22394 -- Refactored built-in datetime lookups to transforms.Jon Dufresne
2015-04-18Removed cases of six.iter* wrapped in a list()Curtis Maloney
There's absolutely no advantage [and a mild performance hit] to using six.iter* in these cases.
2015-04-18Fixed #23879 -- Allowed model migration skip based on feature/vendorClaude Paroz
Thanks Carl Meyer for the report and review, and Tim Graham for the review.
2015-04-16Fixed #24605 -- Fixed incorrect reference to alias in subquery.Anssi Kääriäinen
Thanks to charettes and priidukull for investigating the issue, and to kurevin for the report.
2015-04-16Fixed #24615 -- ordering by expression not part of SELECTAnssi Kääriäinen
Fixed queries where an expression was used in order_by() but the expression wasn't in the query's select clause (for example the expression could be masked by .values() call) Thanks to Trac alias MattBlack85 for the report.
2015-04-14Fixed #24277 -- Added exception when dict used in QuerySet filteringAlex Wilson
2015-04-13Fixed #24611 -- Fixed update() crash with related UUID pk object.Jay Wineinger
2015-04-09Fixed #24609 -- Made ConcatPair use CONCAT_WS() on MySQLAdam Chainz
2015-04-09Fixed #24578 -- Fixed crash with QuerySet.update() on FK to O2O fields.Tim Graham
Thanks Anssi Kääriäinen for review.
2015-03-29Fixed #19259 -- Added group by selected primary keys support.Simon Charette
2015-03-26Fixed #24505 -- Fixed clash with hidden m2m fields.Marco Fucci
Added support for multiple m2m fields with the same 'to' model and with related_name set to '+'.
2015-03-25Fixed #24215 -- Refactored lazy model operationsAlex Hill
This adds a new method, Apps.lazy_model_operation(), and a helper function, lazy_related_operation(), which together supersede add_lazy_relation() and make lazy model operations the responsibility of the App registry. This system no longer uses the class_prepared signal.
2015-03-25Renamed Field.rel attribute to remote_fieldAnssi Kääriäinen
Field.rel is now deprecated. Rel objects have now also remote_field attribute. This means that self == self.remote_field.remote_field. In addition, made the Rel objects a bit more like Field objects. Still, marked ManyToManyFields as null=True.
2015-03-25Renamed ForeignObject.related_field to target_fieldAnssi Kääriäinen
2015-03-25Removed field.field check in setup_joins()Anssi Kääriäinen
2015-03-25Refs #24267 -- Implemented lookups for related fieldsAnssi Kääriäinen
Previously related fields didn't implement get_lookup, instead related fields were treated specially. This commit removed some of the special handling. In particular, related fields return Lookup instances now, too. Other notable changes in this commit is removal of support for annotations in names_to_path().
2015-03-24Fixed #24483 -- Prevented keepdb from breaking with generator choices.David Szotten
If Field.choices is provided as an iterator, consume it in __init__ instead of using itertools.tee (which ends up holding everything in memory anyway). Fixes a bug where deconstruct() was consuming the iterator but bypassing the call to `tee`.
2015-03-23Fixed #23697 -- Improved ForeignObject.get_lookup_constraint() error message.Michael Blatherwick
2015-03-22Fixed #24485 -- Allowed combined expressions to set output_fieldJosh Smeaton
2015-03-22Fixed #24508 -- Made annotations commutativeJosh Smeaton
2015-03-21Fixed #24479 -- Added system check to prevent both ordering and order_wrt.Jon Dufresne
2015-03-21Removed double pop from meta_attrs.Jon Dufresne
2015-03-18Fixed #24495 -- Allowed unsaved model instance assignment check to be bypassed.Karl Hobley
2015-03-17Fixed typo in refs #15579 comment.Tim Graham
2015-03-17Refs #24485 -- Renamed some expression typesJosh Smeaton