[sqlalchemy] mixing metaclass with redefining the primary key of an autoloaded table

2010-05-10 Thread GHZ
Hi, Using plain Declarative, I am able to redefine a primary key column that has been autoloaded, so that I can link it to an oracle sequence and give it a new name: Id = Column('id', Integer, Sequence('table_sq'), primary_key=True) However, if I then try to add some methods to the class using

Re: [sqlalchemy] mixing metaclass with redefining the primary key of an autoloaded table

2010-05-10 Thread Michael Bayer
the clue here is that you're needing to call useexisting. this means a Table that is already reflected will be pulled from the metadata. By adding your own id column, that blows away the id that was already reflected, which is what the addresses primary key is pointing to: pdb at line