On Thu, 2007-01-02 at 19:06 -0500, Karl Guertin wrote:
> This is an SA list question, but...
> 
> On 2/1/07, iain duncan <[EMAIL PROTECTED]> wrote:
> > - I want to be able to say "select articles where page.id=2, order by
> > ordering"
> 
> http://www.sqlalchemy.org/docs/adv_datamapping.myt#advdatamapping_orderby
> 
> > # article mapper
> > assign_mapper( session.context, Article, article_table)
> >
> > # page mapper with m-to-m relation on articles
> > assign_mapper(session.context, Page, page_table, properties = {
> >     "articles": relation(Article, secondary=page_article_table,
>       order_by=page_article_table.c.order,
> > backref="pages", lazy=False)})
> >
> > assign_mapper( session.context, Page_Article, page_article_table )

Hmm, I got the following error:

InvalidRequestError: Given column 'page_article.ordering', attached to
table 'page_article', failed to locate a corresponding column from table
'article_36c9'

I'll go look at that article and join the SA list though. 

Thanks,
Iain



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

Reply via email to