#28047: Regression in query set against 1.10
-------------------------------------+-------------------------------------
Reporter: Thierry | Owner: nobody
Bastian |
Type: Bug | Status: new
Component: Database | Version: 1.11
layer (models, ORM) |
Severity: Normal | Keywords: regression
Triage Stage: | Has patch: 0
Unreviewed |
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
-------------------------------------+-------------------------------------
I have this (simplified)
from django.db import models
class Foo(models.Model):
class Meta:
app_label = 'inventory'
pass
class Bar(models.Model):
class Meta:
app_label = 'inventory'
foo = models.OneToOneField(Foo, primary_key=True,
on_delete=models.CASCADE)
Of course you need an app named inventory. But just use this and try to
create a query set like this:
Bar.objects.filter(foo__in=Foo.objects.all())
Obviously I had different criteria.
Creating that query set says:
"django.core.exceptions.FieldError: Cannot resolve keyword 'foo' into
field. Choices are: bar, id"
That was working just fine in Django 1.10
--
Ticket URL: <https://code.djangoproject.com/ticket/28047>
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/052.0ecbbcd22723ce225cd06743267c51da%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.