Annotating a Django queryset with a left outer join?

前端 未结 10 762
予麋鹿
予麋鹿 2020-12-14 01:06

Say I have a model:

class Foo(models.Model):
    ...

and another model that basically gives per-user information about Foo:

10条回答
  •  醉话见心
    2020-12-14 02:02

    The two queries you suggest are as good as you're going to get (without using raw()), this type of query isn't representable in the ORM at present time.

提交回复
热议问题