Re: Query field with reference

2013-10-08 Thread Hélio Miranda
I managed to solve the problem, I did so: *result = [a.get_json() for a in Player.objects.filter(position__in=Position.objects.filter(name=positionpost))] * Thanks for the trouble -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe

Re: Query field with reference

2013-10-08 Thread Hélio Miranda
Gives error says: DD is not a valid ObjectId For the DD not objectId of reference -- 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...@googl

Re: Query field with reference

2013-10-08 Thread Leonardo Giordani
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 Digita

Query field with reference

2013-10-08 Thread Hélio Miranda
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