Hi iain
On 2/5/07, iain duncan <[EMAIL PROTECTED]> wrote:
> Below is my code in case someone has time to look at it. At the moment it
> works to get
> article.ordering as a list instead of one field. Is there a way to tell it
> that this is only supposed to be one item?
uselist is your friend.. :)
Try this:
# mapper for PageArticleAssoc
mapper( PageArticleAssoc, page_article_table,
primary_key= [ page_article_table.c.page_id,
page_article_table.c.article_id ],
properties={
'article' : relation(Article, lazy=False, uselist=False),
'page' : relation(Page, lazy=False, uselist=False),
}
)
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"sqlalchemy" 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/sqlalchemy?hl=en
-~----------~----~----~----~------~----~------~--~---