#NEWLINE# @ classmethod #NEWLINE# def __declare_first__( cls ) : #NEWLINE# #INDENT# m = cls . __mapper__ #NEWLINE# if m . with_polymorphic : #NEWLINE# #INDENT# return #NEWLINE# #UNINDENT# mappers = list ( m . self_and_descendants ) #NEWLINE# pjoin = cls . _create_polymorphic_union ( mappers ) #NEWLINE# m . _set_with_polymorphic ( ( '*' , pjoin ) ) #NEWLINE# m . _set_polymorphic_on ( pjoin . c . type )