Hi all,

Despite some doc and web digging, I didn't find how to tell sqa to behave
the way I want :
on deletion on Peripheral, also delete in Actuator.

with the following code, the record in Actuator remains after a deletion,
and a subsequent creation fails with IntegrityError.

class Peripheral(Base):
    __tablename__ = 'peripheral'
    id = Column(Integer, primary_key=True)
    label = Column(String(20), nullable=False)

    __mapper_args__ = {'polymorphic_on': peripheral_type,
                       'polymorphic_identity': 'peripheral'}

class Actuator(Peripheral):
    __tablename__ = 'actuator'
    __mapper_args__ = {'polymorphic_identity': 'actuator'}
    id = Column(None, ForeignKey('peripheral.id'), primary_key=True)

    duration = Column(Integer)

Any suggestion ?

Regards,

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