Does Django support JOIN?

Is Django ORM support supported as INNER JOIN, LEFT JOIN, RIGHT JOIN AND OUTER JOIN?

I read the document and did not find it.

For example, how can I do this?

SELECT * 
FROM auth_user_groups
JOIN test_groups ON auth_user_groups.group_id=test_groups.group_id
WHERE test_id='1'
AND user_id='2'
LIMIT 1

test_group is a Many to many table, without a model class.

+3
source share
1 answer

No. Use relational fields and the corresponding processed queries to complete the connections instead.

0
source

All Articles