On 7/15/15 9:09 AM, Richard Gerd Kuesters wrote:
hi all,
i was wondering if there's a way to create more than one level of
polymorphic entities in sa. quick example:
class Foo(Base):
...
__mapper_args__ = { ... }
class Bar(Foo):
...
__mapper_args__ = { ??? } # <--- polymorphic_identity for ...
two?
class Baz(Bar): # <--- is this possible?
...
yes, you give a new polymorphic_identity to Baz separate from Bar.
The only requirement is that they are all using the same column on "Foo"
for the differentiation (cascading polymorphic_on columns isn't
supported yet).
cheers,
Richard.
--
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
<mailto:sqlalchemy+unsubscr...@googlegroups.com>.
To post to this group, send email to sqlalchemy@googlegroups.com
<mailto:sqlalchemy@googlegroups.com>.
Visit this group at http://groups.google.com/group/sqlalchemy.
For more options, visit https://groups.google.com/d/optout.
--
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.