#NEWLINE# def set_parent( self , parent , init ) : #NEWLINE# #INDENT# if self . map_column : #NEWLINE# #INDENT# if ( self . key not in parent . mapped_table . c ) : #NEWLINE# #INDENT# raise sa_exc . ArgumentError ( ( "Can't compile synonym '%s': no column on table '%s' named '%s'" % ( self . name , parent . mapped_table . description , self . key ) ) ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( ( parent . mapped_table . c [ self . key ] in parent . _columntoproperty ) and ( parent . _columntoproperty [ parent . mapped_table . c [ self . key ] ] . key == self . name ) ) : #NEWLINE# #INDENT# raise sa_exc . ArgumentError ( ( "Can't call map_column=True for synonym %r=%r, a ColumnProperty already exists keyed to the name %r for column %r" % ( self . key , self . name , self . name , self . key ) ) ) #NEWLINE# #UNINDENT# #UNINDENT# p = properties . ColumnProperty ( parent . mapped_table . c [ self . key ] ) #NEWLINE# parent . _configure_property ( self . name , p , init = init , setparent = True ) #NEWLINE# p . _mapped_by_synonym = self . key #NEWLINE# #UNINDENT# self . parent = parent