So I have to maintain the join myself like this ?

foo = Foo.get(1)
bar = Bar.get(1)
foobar = FooBar(foo=foo,bar=bar, some_other_field=x)

And to use it :

for x in foo.bars:
  y = Bars.get(x)

that seems to be fine and given the limitation of Related join, may be
this is more versatile.

anders pearson wrote:
> you should use something more like:
>
>   class Foo(SQLObject):
>       bars = MultipleJoin('FooBar')
>
>   class Bar(SQLObject):
>       foos = MultipleJoin('FooBar')
>
>   class FooBar(SQLObject):
>       foo = ForeignKey('Foo')
>       bar = ForeignKey('Bar')
>       some_other_field = StringCol()
>
> --
> anders pearson : http://www.columbia.edu/~anders/
>    C C N M T L : http://www.ccnmtl.columbia.edu/
>         weblog : http://thraxil.org/

Reply via email to