开发者

sorting by a related item with ming on mongodb

setup

A TurboGears2 project using ming as an ORM for mongodb. I'm 开发者_如何学Goused to working with relational databases and the Django ORM.

question

Ming claims to let to interact with mongodb like it's a relational database and a common thing to do in a relational database is sort a query by a property of a foreign key. With the Django ORM this is expressed with double underscores like so: MyModel.objects.all().order_by('user__username')

Is there an equivalent for this in ming?


I have never used ming, but they seem to have a sort method that you can add to a query, check it out here, not much in the form of documentation

I use mongoengine, it has great documentation and its very similar to the django ORM

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜