[Django] #27581: Second-level proxy fails to inherit reverse relation from parent proxy

4 views
Skip to first unread message

Django

unread,
Dec 8, 2016, 7:13:37 AM12/8/16
to django-...@googlegroups.com
#27581: Second-level proxy fails to inherit reverse relation from parent proxy
-------------------------------------+-------------------------------------
Reporter: Shai | Owner: nobody
Berger |
Type: Bug | Status: new
Component: Database | Version: 1.8
layer (models, ORM) |
Severity: Normal | Keywords:
Triage Stage: | Has patch: 0
Unreviewed |
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
-------------------------------------+-------------------------------------
Double proxy models are, as has been noted before, a questionable design
decision, but they should still work (the reason here: we need more than
one Admin interface for the parent proxy class). We have, basically, this:
{{{
class A(models.Model):
pass

class B(A):
class Meta:
proxy=True

class F(models.Model):
b = models.ForeignKey(B, related_name="bffs")

class C(B):
class Meta:
proxy=True
}}}

and when we try
{{{
qset = C.objects.filter(bffs__in=whatever)
}}}
we get "bffs not recognized, options are ..."

Not sure if this still happens with master, will try to repro later.

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

Django

unread,
Dec 8, 2016, 9:46:00 AM12/8/16
to django-...@googlegroups.com
#27581: Second-level proxy fails to inherit reverse relation from parent proxy
-------------------------------------+-------------------------------------
Reporter: Shai Berger | Owner: nobody
Type: Bug | Status: new
Component: Database layer | Version: 1.8
(models, ORM) |
Severity: Normal | Resolution:
Keywords: | Triage Stage:
| Unreviewed
Has patch: 0 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by Simon Charette):

This should be fixed by 5b980897f2da3c048d88029af554e0fc4be68a8e in 1.10
and master.

--
Ticket URL: <https://code.djangoproject.com/ticket/27581#comment:1>

Django

unread,
Dec 8, 2016, 3:05:10 PM12/8/16
to django-...@googlegroups.com
#27581: Second-level proxy fails to inherit reverse relation from parent proxy
-------------------------------------+-------------------------------------
Reporter: Shai Berger | Owner: nobody
Type: Bug | Status: closed

Component: Database layer | Version: 1.8
(models, ORM) |
Severity: Normal | Resolution: fixed
Keywords: | Triage Stage:
| Unreviewed
Has patch: 0 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Simon Charette):

* status: new => closed
* resolution: => fixed


Comment:

I confirmed this was fixed in Django 1.10.

--
Ticket URL: <https://code.djangoproject.com/ticket/27581#comment:2>

Reply all
Reply to author
Forward
0 new messages