I am having a problem using multiple tables to set up a class and subclass.
In this case the sub-class adds a couple of extra fields and has a different set of primary keys: employees = Table('employees', metadata, Column('uid', Integer, primary_key=True), Column('ts', Integer, primary_key=True), Column('name', String(50)), Column('type', String(30))) managers = Table('managers', metadata, Column('mid', Integer, primary_key=True), Column('uid', Integer, ForeignKey('employees.uid'), primary_key=True), Column('m_info', String(50)), ) Whenever a new instance is added (with a unique mid,uid,ts), it tries to update the existing 'manager' based only on the keys mid,uid. This generates the following exception: sqlalchemy.exceptions.FlushError: New instance [EMAIL PROTECTED] with identity key (<class '__main__.Manager'>, (1, 1), None) conflicts with persistent instance [EMAIL PROTECTED] Attached is a full test case. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
test_inherit.py
Description: Binary data
Thanks for any suggestions. --Bill Noon