On Wed, 2003-05-14 at 17:02, J-P Lee wrote:
> Is it possible to backreference a 1-to-1 join using the _joins
> attribute? The documentation only mentions one-to-many and
> many-to-many. Foreign keys enable a one way reference, but I'd like to
> get the reverse implemented as well.
Not yet. At some point soon I'm going to clean up and extend joins.
For now you might want to just do:
class Something(SQLObject):
def _get_other(self):
return Other.selectBy(somethingID=self.id)[0]
def _set_other(self, value):
value.somethingID = self.id
|