summaryrefslogtreecommitdiff
path: root/docs
AgeCommit message (Collapse)Author
2008-04-24queryset-refactor: Changed the way order_by() and distinct() interact.Malcolm Tredinnick
When using "select distinct" all ordering columns must be part of the output (select) columns. We were previously just throwing away ordering columns that weren't included, but there are some cases where they are needed and it's difficult to add them in manually. So now the default behaviour is to append any missing columns. This can affect the output of distinct() if complicated order_by() constructs are used, so the documentation has been updated with an explanation of what's going on there. Fixed #7070. git-svn-id: http://code.djangoproject.com/svn/django/branches/queryset-refactor@7455 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-04-24queryset-refactor: Added a note about using already present tables inMalcolm Tredinnick
extra(tables=...). This is already a problem in trunk and it's pretty much impossible to work around in a non-complex way, so it's user beware (it's usually easy enough to avoid the problems). git-svn-id: http://code.djangoproject.com/svn/django/branches/queryset-refactor@7453 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-04-24queryset-refactor: Clarified what the default reverse names are forMalcolm Tredinnick
ManyToManyFields and ForeignKeys on abstract base classes. git-svn-id: http://code.djangoproject.com/svn/django/branches/queryset-refactor@7452 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-04-24queryset-refactor: Renamed the Queryset method valueslist() to values_list.Malcolm Tredinnick
Suggested by Michael Trier. It's more consistent with order_by, select_related, etc. This is backwards incompatible for people previously using this method on the branch (the method doesn't exist on trunk, so it's very minor). git-svn-id: http://code.djangoproject.com/svn/django/branches/queryset-refactor@7451 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-04-23queryset-refactor: Removed a warning about "experimental API", since there'sMalcolm Tredinnick
not really any obviously better way to do this. Let it stand. git-svn-id: http://code.djangoproject.com/svn/django/branches/queryset-refactor@7448 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-04-16queryset-refactor: Added a way to specify the related_name attribute onMalcolm Tredinnick
abstract base classes. git-svn-id: http://code.djangoproject.com/svn/django/branches/queryset-refactor@7432 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-04-13queryset-refactor: Merged from trunk up to [7415].Malcolm Tredinnick
git-svn-id: http://code.djangoproject.com/svn/django/branches/queryset-refactor@7416 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-04-01queryset-refactor: Merged from trunk up to [7388].Malcolm Tredinnick
git-svn-id: http://code.djangoproject.com/svn/django/branches/queryset-refactor@7396 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-03-20queryset-refactor: Merged from trunk up to [7338].Malcolm Tredinnick
git-svn-id: http://code.djangoproject.com/svn/django/branches/queryset-refactor@7341 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-03-20queryset-refactor: Fixed up extra(select=...) calls with parameters so that theMalcolm Tredinnick
parameters are substituted in correctly in all cases. This introduces an extra argument to extra() for this purpose; no alternative there. Also fixed values() to work if you don't specify *all* the extra select aliases in the values() call. Refs #3141. git-svn-id: http://code.djangoproject.com/svn/django/branches/queryset-refactor@7340 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-03-19queryset-refactor: Implemented a way to differentiate between filtering on aMalcolm Tredinnick
single instance and filtering on multiple instances when spanning a multi-valued relationship. git-svn-id: http://code.djangoproject.com/svn/django/branches/queryset-refactor@7317 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-03-18queryset-refactor: Undo [7220] and allow ordering on multi-valued field.Malcolm Tredinnick
Some people will shoot themselves in the foot with this. That's bad luck. The reason we need it is because some data semantics cannot be expressed in Django's ORM and that shouldn't prevent ordering on that data. For example, filtering suburbs by a geographic region and then ordering on the suburb names. The names might not be unique outside that region, but unique inside it. Django cannot know that (you can't tell the model about it), so we trust the caller. git-svn-id: http://code.djangoproject.com/svn/django/branches/queryset-refactor@7285 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-03-18queryset-refactor: Merged from trunk up to [7280]Malcolm Tredinnick
git-svn-id: http://code.djangoproject.com/svn/django/branches/queryset-refactor@7281 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-03-12queryset-refactor: Refactored the way values() works so that it works properlyMalcolm Tredinnick
across inherited models. Completely by accident, this also allows values() queries to include fields from related models, providing it is crossing a single-valued relation (one-to-one, many-to-one). Many-to-many values() fields still aren't supported, since that requires actual thinking. So this refs #5768. git-svn-id: http://code.djangoproject.com/svn/django/branches/queryset-refactor@7230 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-03-11queryset-refactor: Reorganised Model.save() to differentiate between public ↵Malcolm Tredinnick
and private parameters. Refs #6741. This means subclasses can override save() without needing to worry about passing around the internal parameters (an issue for subclassable models, which would have meant every model, since you don't know when somebody will subclass your model). Slightly backwards incompatible, since it moves "raw" back to being part of the internal API (it's only needed by the serializer and was intended to be internal use only). If external code really needs this, they can call Model.save_base() and pass in raw there. git-svn-id: http://code.djangoproject.com/svn/django/branches/queryset-refactor@7221 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-03-11queyrset-refactor: Added error reporting if somebody tries to order by a ↵Malcolm Tredinnick
multi-valued field. git-svn-id: http://code.djangoproject.com/svn/django/branches/queryset-refactor@7220 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-03-11queryset-refactor: Merged from trunk up to [7216].Malcolm Tredinnick
git-svn-id: http://code.djangoproject.com/svn/django/branches/queryset-refactor@7219 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-02-28queryset-refactor: Merged from trunk up to [7168].Malcolm Tredinnick
git-svn-id: http://code.djangoproject.com/svn/django/branches/queryset-refactor@7173 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-02-28queryset-refactor: Head off any attempts to use unique_together across ↵Malcolm Tredinnick
inherited models. We don't support check constraints and triggers, so trying to do this would be optimistic at best. git-svn-id: http://code.djangoproject.com/svn/django/branches/queryset-refactor@7172 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-02-23queryset-refactor: Added valuelist() method to querysets. Refs #2482.Malcolm Tredinnick
git-svn-id: http://code.djangoproject.com/svn/django/branches/queryset-refactor@7149 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-02-23queryset-refactor: Implemented the reverse() method on querysets.Malcolm Tredinnick
Refs #5012. git-svn-id: http://code.djangoproject.com/svn/django/branches/queryset-refactor@7148 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-02-23queryset-refactor: Implemented slicing to end of querysets.Malcolm Tredinnick
Refs #2150, #5012. git-svn-id: http://code.djangoproject.com/svn/django/branches/queryset-refactor@7147 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-02-22queryset-refactor: Added the ability to manually specify a child-parent link.Malcolm Tredinnick
git-svn-id: http://code.djangoproject.com/svn/django/branches/queryset-refactor@7142 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-02-22queryset-refactor: Fixed up and documented Meta-class inheritance.Malcolm Tredinnick
Should be mostly logical (for versions of "logical" that may require you to be a Vulcan, admittedly, but that's not entirely my fault). git-svn-id: http://code.djangoproject.com/svn/django/branches/queryset-refactor@7141 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-02-20queryset-refactor: Merged from turnk up to [7135] because I need some stuff.Malcolm Tredinnick
git-svn-id: http://code.djangoproject.com/svn/django/branches/queryset-refactor@7136 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-02-17queryset-refactor: Model inheritance support.Malcolm Tredinnick
This adds both types of model inheritance: abstract base classes (ABCs) and multi-table inheritance. See the documentation and tests / examples for details. Still a few known bugs here, so don't file tickets (I know about them). Not quite ready for prime-time usage, but it mostly works as expected. git-svn-id: http://code.djangoproject.com/svn/django/branches/queryset-refactor@7126 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-02-16queryset-refactor: Merged from trunk up to [7122].Malcolm Tredinnick
git-svn-id: http://code.djangoproject.com/svn/django/branches/queryset-refactor@7124 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-02-08queryset-refactor: Fixed up OneToOneFields (mostly).Malcolm Tredinnick
They now share as much code as possible with ForeignKeys, but behave more or less as they did before (the backwards incompatible change is that they are no longer automatically primary keys -- so more than one per model is permitted). The documentation still uses an example that is better suited to model inheritance, but that will change in due course. Also, the admin interface still shows them as read-only fields, which is probably wrong now, but that can change on newforms-admin after this branch is merged into trunk. git-svn-id: http://code.djangoproject.com/svn/django/branches/queryset-refactor@7096 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-02-04queryset-refactor: Merged changes from trunk up to [7085].Malcolm Tredinnick
git-svn-id: http://code.djangoproject.com/svn/django/branches/queryset-refactor@7086 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-01-28queryset-refactor: Added an update method to QuerySets, since it's needed forMalcolm Tredinnick
moving SQL out of the core code. Only direct fields and foreign keys can be updated in this fashion, since multi-table updates are very non-portable. This also cleans up the API for the UpdateQuery class a bit. Still need to change DeleteQuery to work similarly, I suspect. Refs #4260. git-svn-id: http://code.djangoproject.com/svn/django/branches/queryset-refactor@7043 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-01-28queryset-refactor: Added a way to clear all default ordering from a queryset,Malcolm Tredinnick
by calling order_by() with no parameters. git-svn-id: http://code.djangoproject.com/svn/django/branches/queryset-refactor@7042 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-01-26queryset-refactor: Merged from trunk up to [7025].Malcolm Tredinnick
git-svn-id: http://code.djangoproject.com/svn/django/branches/queryset-refactor@7029 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-01-09queryset-refactor: Merged from trunk up to [7002].Malcolm Tredinnick
git-svn-id: http://code.djangoproject.com/svn/django/branches/queryset-refactor@7004 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-12-19queryset-refactor: Merged from trunk up to [6953].Malcolm Tredinnick
git-svn-id: http://code.djangoproject.com/svn/django/branches/queryset-refactor@6954 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-12-09queryset-refactor: Allow specifying of specific relations to follow inMalcolm Tredinnick
select_related(). Refs #5020. git-svn-id: http://code.djangoproject.com/svn/django/branches/queryset-refactor@6899 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-12-03queryset-refactor: Merged from trunk up to [6856].Malcolm Tredinnick
git-svn-id: http://code.djangoproject.com/svn/django/branches/queryset-refactor@6857 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-11-30queryset-refactor: Interpret qs.filter(foo=None) to be the same as ↵Malcolm Tredinnick
qs.filter(foo__isnull=True). Refs #2737. git-svn-id: http://code.djangoproject.com/svn/django/branches/queryset-refactor@6760 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-11-29queryset-refactor: Merged from trunk up to [6752].Malcolm Tredinnick
git-svn-id: http://code.djangoproject.com/svn/django/branches/queryset-refactor@6753 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-11-28queryset-refactor: Merged from trunk up to [6724].Malcolm Tredinnick
git-svn-id: http://code.djangoproject.com/svn/django/branches/queryset-refactor@6726 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-11-18queryset-refactor: Fixed up a few problems from the previous merge from trunk.Malcolm Tredinnick
git-svn-id: http://code.djangoproject.com/svn/django/branches/queryset-refactor@6693 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-11-18queryset-refactor: Merged from trunk up to [6689].Malcolm Tredinnick
git-svn-id: http://code.djangoproject.com/svn/django/branches/queryset-refactor@6690 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-11-03queryset-refactor: Merged from trunk up to [6635].Malcolm Tredinnick
git-svn-id: http://code.djangoproject.com/svn/django/branches/queryset-refactor@6638 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-11-03queryset-refactor: Merged from trunk up to [6623].Malcolm Tredinnick
git-svn-id: http://code.djangoproject.com/svn/django/branches/queryset-refactor@6637 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-10-24queryset-refactor: Added the ability to apply parameters to the selectMalcolm Tredinnick
fragments in QuerySet.extra(). Refs #2902 git-svn-id: http://code.djangoproject.com/svn/django/branches/queryset-refactor@6603 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-10-23queryset-refactor: Added a convenience all() method to Querysets. Refs #3739Malcolm Tredinnick
git-svn-id: http://code.djangoproject.com/svn/django/branches/queryset-refactor@6600 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-10-23queryset-refactor: Merged from trunk up to [6595].Malcolm Tredinnick
git-svn-id: http://code.djangoproject.com/svn/django/branches/queryset-refactor@6597 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-10-15queryset-refactor: Added a bunch of "new in development version" markers forMalcolm Tredinnick
recent additions. git-svn-id: http://code.djangoproject.com/svn/django/branches/queryset-refactor@6520 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-10-15queryset-refactor: Added ~ support to Q-objects. Based heavily on a patch fromMalcolm Tredinnick
Collin Grady. Refs #4858. git-svn-id: http://code.djangoproject.com/svn/django/branches/queryset-refactor@6518 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-10-15queryset-refactor: Made the use of values() for ForeignKey fields consistentMalcolm Tredinnick
and documented this feature. Refs #4358. git-svn-id: http://code.djangoproject.com/svn/django/branches/queryset-refactor@6516 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2007-10-15queryset-refactor: Updated documentation to describe the new order_by() andMalcolm Tredinnick
extra(order_by=...) behaviour. git-svn-id: http://code.djangoproject.com/svn/django/branches/queryset-refactor@6513 bcc190cf-cafb-0310-a4f2-bffc1f526a37