On Sun, Apr 27, 2008 at 09:28:19PM +0000, Matthew Wilson wrote:
> 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.

   What is ".departments"? MultiplJoin? Use SQLMultipleJoin - it runs one
query for one access. It also handles ordering better (can use any SQL
expression). It returns SelectResults instead of a list, but every "for"
loop will happily iterate over it.

Oleg.
-- 
     Oleg Broytmann            http://phd.pp.ru/            [EMAIL PROTECTED]
           Programmers don't die, they just GOSUB without RETURN.

-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
sqlobject-discuss mailing list
sqlobject-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sqlobject-discuss

Reply via email to