문제

setup

A TurboGears2 project using ming as an ORM for mongodb. I'm used 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

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top