Re: [SQLObject] problems with SQLObject autonaming scheme
SQLObject is a Python ORM.
Brought to you by:
ianbicking,
phd
|
From: Max I. <ma...@uc...> - 2004-10-22 06:48:02
|
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!
|