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 WordpressUser. > > 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 this, are you: http://www.sqlalchemy.org/trac/wiki/WhyDontForeignKeysLoadData Basically, setting author_id to a number won't automatically cause the author to be loaded. If that's not the case in your situation, I'm out of ideas. Do you have a test case? Simon --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---