#15711: Abstract model managers should return subclass instances
-------------------------------------+-------------------------------------
   Reporter:  jdunck                 |                    Owner:  nobody
     Status:  new                    |                Milestone:
  Component:  Database layer         |                  Version:  1.2
  (models, ORM)                      |             Triage Stage:
   Keywords:  pony                   |  Unreviewed
  Has patch:  0                      |      Needs documentation:  0
Needs tests:  0                      |  Patch needs improvement:  0
-------------------------------------+-------------------------------------
 Suppose a base:

 {{{
 class Document(Model):
    title = CharField()

    class Meta:
      abstract = True

 class Presentation(Document):
    num_kitten_pictures = IntegerField()

 class Spreadsheet(Document):
     num_pie_charts = IntegerField()
 }}}

 It would be useful if Documents.objects.filter(title='x') returned
 instances of both Presentation and Spreadsheet whose title was 'x'.

 I'd expect support only for base-class fields.  This should be safe, since
 inheritance should follow an is-a relationship.

-- 
Ticket URL: <http://code.djangoproject.com/ticket/15711>
Django <http://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.

Reply via email to