Opened 12 years ago

Closed 12 years ago

#6025 closed (duplicate)

Q object relationship spanning

Reported by: yopi Owned by: nobody
Component: Database layer (models, ORM) Version: master
Severity: Keywords:
Cc: yannvr@… Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no


the route 835 is a record of the table payment itself and does not appear when searched in the table deal via the FK deal

>>> MtPayment.objects.filter(route=835)
[<MtPayment: 132>]
>>> MtPayment.objects.filter(deal__route=835)

But filtering on both criterias using a Q object fails to find anything:

>>> MtPayment.objects.filter(Q(route =835)|Q(deal__route=835))

Change History (2)

comment:1 Changed 12 years ago by Yopi <yannvr@…>

Cc: yannvr@… added

comment:2 Changed 12 years ago by Malcolm Tredinnick

Resolution: duplicate
Status: newclosed

Duplicate of #2080.

Note: See TracTickets for help on using tickets.
Back to Top