Thanks! Thanks for the SQLAlchemy too :) It rocks
Goran On Friday, May 3, 2013 6:27:14 PM UTC+2, Michael Bayer wrote: > > > On May 3, 2013, at 12:20 PM, Goran Popovic <goranp...@gmail.com<javascript:>> > wrote: > > > Table Versions > > > > # ID > > # PARENT_ID > > # TEXT > > > > If parent_id == Null: > > its ORIGINAL > > > > if parent_id != Null: > > it's REVISION > > > > Is it possible to achieve this with polymorphic_identity? > > > > It seems that polymorphic_identity doesn't support NULL and not NULL > > > > __mapper_args__ = { > > 'polymorphic_identity':'original' > > } > > not built in, but see the recipe at > http://www.sqlalchemy.org/trac/ticket/1409#comment:3 . > > > -- 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?hl=en. For more options, visit https://groups.google.com/groups/opt_out.