On Tue, Jul 24, 2007 at 09:35:34AM -0700, Tim Black wrote: > >>> Project.get(1).addContractor(Person.get(1)) > Traceback (most recent call last): > File "<console>", line 1, in ? > AttributeError: 'Project' object has no attribute 'addContractor' > > What is the right way to specify that I'm adding a contractor and not a > client?
class Person(SQLObject): name = StringCol() clientProjects = RelatedJoin("Project", intermediateTable="person_project_clients", addRemoveName="Project") contractorProjects = RelatedJoin("Project", intermediateTable="person_project_contractors", addRemoveName="ContractorProject") class Project(SQLObject): name = StringCol() clients = RelatedJoin("Person", intermediateTable="person_project_clients", addRemoveName="Person") contractors = RelatedJoin("Person", intermediateTable="person_project_contractors", addRemoveName="Contractor") 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. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/ _______________________________________________ sqlobject-discuss mailing list sqlobject-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/sqlobject-discuss