That works great, thanks. If I understand correctly, the inherit_condition is deduced automatically, when there is no other foreign key linking to the super-class...
On Thursday, November 19, 2015 at 12:52:33 PM UTC-8, Michael Bayer wrote: > > > > the docs are slight here but the format is like that of the > relationship, just not a string: > > class Package(Container): > # ... > > id = Column(ForeignKey('container.id')) > > # ... > > __mapper_args__ = {'polymorphic_identity': 'Package', > 'inherit_condition': Container.id == id} > > Note the use of "id" as a local variable within the "class" block. > > -- You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To unsubscribe from this group and stop receiving emails from it, send an email to sqlalchemy+unsubscr...@googlegroups.com. To post to this group, send email to sqlalchemy@googlegroups.com. Visit this group at http://groups.google.com/group/sqlalchemy. For more options, visit https://groups.google.com/d/optout.