On Wed, Jan 25, 2006 at 09:40:56AM -0600, Tim Wilson wrote:
> Since I'm defining all of the relationships between  
> tables in my classes by including lots of RelatedJoins and  
> MultipleJoins, it would be cool if SQLObject could infer what  
> straight joins are required.

   Patches will be gladly accepted!

> I'm afraid it's still not clear how I address the join tables that  
> SQLObject creates to handle the many-to-many relationships that exist  
> in my model. When I try your suggestion I get a NameError because  
> StaffSubject (for example) is not defined. Do I need to create  
> classes for those join tables? That wouldn't seem to fit with what  
> I've read in the docs.

   That because MultipleJoin is not intended for sqlbuilder queries. It's
intended for manipulation in Python:

   row_of_my_table = MyTable.get(id)
   for subobject in row_of_my_table.referenced_objects:
      process(subobject)

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: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
_______________________________________________
sqlobject-discuss mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sqlobject-discuss

Reply via email to