Oh, and regarding the other part of your answer:
>
> These class definitions should be merged with those in Tables.py. You should
> only have one "class Parent" statement and one "class Child" statement. You
> may be confusing this with the non-declarative class setup, where you define
> the table first, class 2nd, and mapper 3rd. It looks like rdb uses the
> declarative approach, where the table and mapper are defined as part of the
> class in one step.

You were right again. I was creating a new instance of rdb.metadata()
in every class, and that's wrong (let me rephrase it... I THINK its
wrong). If my understanding is correct, that "metadata" thing is what
keeps track of the mapping (what classes are mapped to what tables,
etcetera). It actually needs to be global.

-- 
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To post to this group, send email to sqlalch...@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