Carlos Ribeiro wrote:
> It seems that you've had hit the same problem I had last week. I have
> posted a few messages here; in the last one there is a suggestion for
> a ammendment to the documentation, in the tutorial part. I don't know
> if Ian has read it though.
The funny things is that I did search mailing list before posting my
question and I even did read your mail and the follow-ups - I just
didn't realize it was the answer to my question as well. ;-)
> The solution is simple -- use the joinColumn argument in your
> MultipleJoin entry, as follows:
>
> class OrderGateway(SQLObject):
> name = StringCol()
> prints = MultipleJoin('PrintGateway', joinColumn='order')
I had to change last line to
prints = MultipleJoin('PrintGateway', joinColumn='order_id')
>
> class PrintGateway(SQLObject):
> size = StringCol()
> order = ForeignKey('OrderGateway')
>
Thanks a lot!
|