[SQLObject] Re: object has no attribute
SQLObject is a Python ORM.
Brought to you by:
ianbicking,
phd
From: Cyril E. <cy...@de...> - 2004-08-31 12:35:04
|
Ian, The joinMethodName argument doesn't work with MultipleJoin. If I write the following: class Patient(SQLObject): teeth = MultipleJoin("Tooth", joinColumn="patientid", joinMethodName="teeth") the svn verion complains because joinMethodName receives multiple values. In fact I must comment out the parameter setting in the following method from joins.py/Join to make it work. def withClass(self, soClass): return self.baseClass(soClass=soClass, #CE joinMethodName=self._joinMethodName, **self.kw) But the better solution should be, I think, to not have to use joinMethodName at all, the property name does the trick for me. I think that it should be better to set addRemoveName instead; for example: class Patient(SQLObject): teeth = MultipleJoin("Tooth", joinColumn="patientid", addRemoveName="Tooth") ==> defining addTooth and removeTooth Cyril Elkaim |