[sqlalchemy] Re: auto-load ForeignKey references?

2007-05-10 Thread Max Ischenko
Hi, On 5/10/07, King Simon-NFHD78 <[EMAIL PROTECTED]> wrote: > > > Nope, it doesn't work. At least, I can't get it to work. > > > > If I use backref='author' new attribute 'author' appears but equals > > None even though the author_id is something like 123. > > > > You're not getting caught by thi

[sqlalchemy] Re: auto-load ForeignKey references?

2007-05-10 Thread King Simon-NFHD78
Max Ischenko wrote: > > On May 10, 4:38 pm, "King Simon-NFHD78" <[EMAIL PROTECTED]> > wrote: > > You're halfway there with your 'posts' relation. I think if you pass > > backref='author' in your relation, then WordpressPost > objects will get > > an 'author' property which points back to the Wor

[sqlalchemy] Re: auto-load ForeignKey references?

2007-05-10 Thread Max Ischenko
Hello, On May 10, 4:38 pm, "King Simon-NFHD78" <[EMAIL PROTECTED]> wrote: > You're halfway there with your 'posts' relation. I think if you pass > backref='author' in your relation, then WordpressPost objects will get > an 'author' property which points back to the WordpressUser. Nope, it doesn'

[sqlalchemy] Re: auto-load ForeignKey references?

2007-05-10 Thread King Simon-NFHD78
Max Ischenko wrote: > > Hi, > > If I have two tables related via foreign key how can I tell SA that > accessing foreign key should fetch related object automatically? By > default it simply gives me the FK as integer which is not what I want. > > Here are my mappers: > > wp_users_tbl = Tab