I do not know MongoDB, so sorry if I get it wrong. I'd say that you have to write
*result = [a.get_json() for a in Player.objects.filter(position__position_name='DD')] * since in your attached document you set it this way (line 53). Try and let me know Leo Leonardo Giordani Author of The Digital Cat <http://lgiordani.github.com> My profile on About.me <http://about.me/leonardo.giordani> - My GitHub page<https://github.com/lgiordani>- My Coderwall profile <https://coderwall.com/lgiordani> 2013/10/8 Hélio Miranda <helio...@gmail.com> > Hi > I was trying to make a query in a field that has refencia to another > collection, like this: > *result = [a.get_json() for a in > Player.objects.filter(position__name='DD')]* > > But it is returning me empty, and I have a player with the position DD > I'm using mongodb as a database. > > In my Document is thus: > http://plnkr.co/edit/FHH2hZh26OiLMKTk2ToO?p=info > > Does anyone know what I'm doing wrong? > > thank you > > -- > You received this message because you are subscribed to the Google Groups > "Django users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to django-users+unsubscr...@googlegroups.com. > To post to this group, send email to django-users@googlegroups.com. > Visit this group at http://groups.google.com/group/django-users. > To view this discussion on the web visit > https://groups.google.com/d/msgid/django-users/47c58f74-484b-4668-9678-7a50fdea842f%40googlegroups.com > . > For more options, visit https://groups.google.com/groups/opt_out. > -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To post to this group, send email to django-users@googlegroups.com. Visit this group at http://groups.google.com/group/django-users. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAEhE%2BOmUqH2kfcY-Ve0%3D9-HHAtP9sd%2BpyT-358PO9M5Cyq4J%3Dg%40mail.gmail.com. For more options, visit https://groups.google.com/groups/opt_out.