Getting duplicated results when filtering on nested ForeignKeyField #1510
Unanswered
lelecanfora
asked this question in
Q&A
Replies: 1 comment
-
Try:
What sql query does it gives? What sql query are you expecting? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I am confused by the behavior of tortoise orm when filtering on ForeignKeyField.
This is an example of the data model:
TABLE model_a
TABLE model_b
TABLE model_c
when I filter ModelC on the nested key:
I get 2 identical results, both with model_c.id = '1b', both with the same list of 2 activities
why is tortoise not returning the single ModelC with "models_a" as a list of ModelA as it should be?
Beta Was this translation helpful? Give feedback.
All reactions