if I have table like this represented in django model
person
------
id
name
worker
------
personid
jobid
job
---
id
desc
wage
w=Worker.objects.filter(<some sort of filter)
now I want all persons that are related in w
w is given I can not use that statement.
eventually I want to return a json string that represents a dict
with idperson as key and {"job":jobid,"wage":wage} as
one value in list of jobs for that key
http://docs.djangoproject.com/en/1.3/topics/db/queries/#following-relationships-backward
credit to support