#NEWLINE# def test_column_expression_joined( self ) : #NEWLINE# #INDENT# ( base , sub ) = ( self . tables . base , self . tables . sub ) #NEWLINE# class Base ( fixtures . ComparableEntity ) : #NEWLINE# #INDENT# pass #NEWLINE# #UNINDENT# class Sub ( Base ) : #NEWLINE# #INDENT# pass #NEWLINE# #UNINDENT# mapper ( Base , base , polymorphic_on = base . c . type , polymorphic_identity = 'base' ) #NEWLINE# mapper ( Sub , sub , inherits = Base , polymorphic_identity = 'sub' , properties = { #NEWLINE# #INDENT# 'concat' : column_property ( ( ( base . c . data + '|' ) + sub . c . sub ) ) , #NEWLINE# #UNINDENT# } ) #NEWLINE# sess = sessionmaker ( ) ( ) #NEWLINE# s1 = Sub ( data = 's1data' , sub = 's1sub' ) #NEWLINE# s2 = Sub ( data = 's2data' , sub = 's2sub' ) #NEWLINE# s3 = Sub ( data = 's3data' , sub = 's3sub' ) #NEWLINE# sess . add_all ( [ s1 , s2 , s3 ] ) #NEWLINE# sess . commit ( ) #NEWLINE# sess . expunge_all ( ) #NEWLINE# eq_ ( sess . query ( Base ) . order_by ( Base . id ) . all ( ) , [ Sub ( data = 's1data' , sub = 's1sub' , concat = 's1data|s1sub' ) , Sub ( data = 's2data' , sub = 's2sub' , concat = 's2data|s2sub' ) , Sub ( data = 's3data' , sub = 's3sub' , concat = 's3data|s3sub' ) ] )