Join, or equivalent to retrieve accurate objects


(Joakim Ekström) #1

Hi,

I've got a table of jobs, and a table of users. They relate to each other
in a table called job_affinities, where a job_id, a user_id and an affinity
score.

I would like to get a list of jobs, and for the currently logged in user,
sort this list by his/her affinity for each job. How can this be done,
without nesting the entire list of users, with their affinities, for each
job?

Thanks,
Jocke

--


(system) #2