Django ..“加入”查询? [英] Django .."join" query?

查看:117
本文介绍了Django ..“加入”查询?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们认为Django没有加入,但是如何加入?



/ p>

谢谢

解决方案

如果您使用的是模型,则select_related方法将在该模型中为您设置的任何外键返回对象(达到您指定的限制)。


guys, how or where is the "join" query in Django?

i think that Django dont have "join"..but how ill make join?

Thanks

解决方案

If you're using models, the select_related method will return the object for any foreign keys you have set up (up to a limit you specify) within that model.

这篇关于Django ..“加入”查询?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆