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 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?


Actually, it works. More precisely,  I was getting None because the
corresponding entry in wp_users was missing (I love this ref. integrity in
MySQL). If post_author was valid then FK was loaded (if backref were
specified).

Thanks for helping me out.

Max.

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to