[sqlalchemy] Re: Assign mapper many-to-many with extra columns

2007-02-04 Thread Jorge Godoy
iain duncan [EMAIL PROTECTED] writes: On Sat, 2007-03-02 at 18:44 -0500, Karl Guertin wrote: On 2/3/07, iain duncan [EMAIL PROTECTED] wrote: InvalidRequestError: Given column 'page_article.ordering', attached to table 'page_article', failed to locate a corresponding column from table

[sqlalchemy] Re: Assign mapper many-to-many with extra columns

2007-02-03 Thread iain duncan
On Fri, 2007-02-02 at 21:41 -0500, Karl Guertin wrote: Did my suggestion of dropping 'ordering' off of the article and adding an order_by clause to the relation not work? # article mapper assign_mapper( session.context, Article, article_table) # page mapper with m-to-m relation on

[sqlalchemy] Re: Assign mapper many-to-many with extra columns

2007-02-03 Thread Karl Guertin
On 2/3/07, iain duncan [EMAIL PROTECTED] wrote: InvalidRequestError: Given column 'page_article.ordering', attached to table 'page_article', failed to locate a corresponding column from table 'article_36c9' I'd think that you're missing the .c. in the middle: page_article.c.ordering

[sqlalchemy] Re: Assign mapper many-to-many with extra columns

2007-02-03 Thread iain duncan
On Sat, 2007-03-02 at 18:44 -0500, Karl Guertin wrote: On 2/3/07, iain duncan [EMAIL PROTECTED] wrote: InvalidRequestError: Given column 'page_article.ordering', attached to table 'page_article', failed to locate a corresponding column from table 'article_36c9' I'd think that you're