I've got a table of employees and a table of departments and a related
table that joins the two.
So when I do
for dept in employee.departments:
the SQLObject machinery runs a separate query for each department row.
Sometimes, this is fine, but sometimes, I want to do a query where I
grab every department all at once.
I have been manually adding classmethods when I need the "all-at-once"
join to happen, so then I do:
for dept in employee.get_all_departments_at_once():
Is there a better way to do what I'm doing?
I find that running lots and lots of single queries is really slow, so
in a lot of cases, I prefer to just grab everything.