@MIke > SQLAlchemy has to know about all the classes before you do a query that's > going to refer to a remote class' polymorphic_identity, so somewhere you > have to make sure the module was imported. > > I imported the subclass and indeed now "it works". At first this is counter intuitive, but I understand the need. The point now is that I don't really want to know what subclasses there are (hence the polymorfism), so now I've to find a way to import all relevant modules. I'll figure this out but any ideas are welcome.
Anyway: thanks both Mike & Simon for pointing this out. Nacho -- SQLAlchemy - The Python SQL Toolkit and Object Relational Mapper http://www.sqlalchemy.org/ To post example code, please provide an MCVE: Minimal, Complete, and Verifiable Example. See http://stackoverflow.com/help/mcve for a full description. --- 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 https://groups.google.com/group/sqlalchemy. To view this discussion on the web visit https://groups.google.com/d/msgid/sqlalchemy/de8cd30f-f0b6-479d-a823-e65bb32a1c1b%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.