#18012: Propagate reverse foreign keys from proxy models to base class
-------------------------------------+-------------------------------------
     Reporter:  akaariai             |                    Owner:  nobody
         Type:                       |                   Status:  new
  Cleanup/optimization               |
    Component:  Database layer       |                  Version:  1.4
  (models, ORM)                      |
     Severity:  Normal               |               Resolution:
     Keywords:                       |             Triage Stage:  Accepted
    Has patch:  0                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------
Changes (by charettes):

 * cc: charette.s@… (removed)
 * cc: charettes (added)
 * component:  Documentation => Database layer (models, ORM)


Comment:

 Rereading this ticket three years later I think I agree with Anssi at
 last.

 Just to make sure, given the scenario defined above, is this what you have
 in mind?

 {{{#!python
 a = A.objects.create()
 a.b_set.all()  # Not actually possible
 proxya = ProxyA.objects.get()
 proxy.b_set.all()  # Actually possible

 b = B.objects.create(a=proxya)  # Should we allow assigning an A instance
 here?
 b.refresh_from_db()
 assert isinstance(b.a, ProxyA)

 assert A.objects.get(b_set=b) == a  # Not actually possible
 assert ProxyA.objects.get(b_set=b) == proxya
 }}}

--
Ticket URL: <https://code.djangoproject.com/ticket/18012#comment:7>
Django <https://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 unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/066.0c2850d80db2783e7124adaf4cdb3fe4%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to