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 missing the .c. in the middle:
> 
> page_article.c.ordering

Nope, just tried again. The mappers are this:

assign_mapper( session.context, Page_Article, page_article_table )
assign_mapper( session.context, Article, article_table ) 

assign_mapper(session.context, Page, page_table, properties = {
   "articles": relation(Article, secondary=page_article_table,
   order_by=page_article_table.c.ordering,
backref="pages", lazy=False)})

And the error message is still:
InvalidRequestError: Given column 'page_article.ordering', attached to
table 'page_article', failed to locate a corresponding column from table
'article_61f0'

I am sure that I have dropped all tables, re-run the tg-admin sql create
command, and restarted the shell with fresh imports. 

It looks like association proxy is what I need, so I've been spending
the day reading the SA docs thoroughly. Brain is full!

Thanks for the help
Iain


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To post to this group, send email to sqlalchemy@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to