Opened 9 years ago

Closed 9 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: UI/UX:

Description

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 9 years ago by Yopi <yannvr@…>

Cc: yannvr@… added
Needs documentation: unset
Needs tests: unset
Patch needs improvement: unset

comment:2 Changed 9 years ago by Malcolm Tredinnick

Resolution: duplicate
Status: newclosed

Duplicate of #2080.

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