>
> but I thought somehow that meta.reflect() would pick up on the fk
> constraints ...
>

Class MetaData is part of the core api that ORM builds on top of, and
meta.reflect() does pick up the fk constraints from the database.

Think of it this way, MetaData, whether reflected or declared in its
entirety, is holding a database level description of your tables and the fk
relationships, what you need to do is declare to SA's ORM how you will use
the relationships; e.g., are they eager loading, are they 1-1, 1-n or m-n,
are they 2-way, give a name to the relation to use in your Python code, etc.
There are a lot of defaults, but you at least have to give relationships a
name so that they can be used in you program.

--~--~---------~--~----~------------~-------~--~----~
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 
sqlalchemy+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to