#NEWLINE# def test_polymorphic_on_only_in_with_poly( self ) : #NEWLINE# #INDENT# ( t2 , t1 ) = ( self . tables . t2 , self . tables . t1 ) #NEWLINE# Parent = self . classes . Parent #NEWLINE# t1t2_join = select ( [ t1 . c . x ] , from_obj = [ t1 . join ( t2 ) ] ) . alias ( ) #NEWLINE# mapper ( Parent , t2 , polymorphic_on = t1t2_join . c . x , with_polymorphic = ( '*' , t1t2_join ) , polymorphic_identity = 0 )