#NEWLINE# def add_constraints( self ) : #NEWLINE# #INDENT# '\n        Set the base constraints on the relation query.\n\n        :rtype: None\n        ' #NEWLINE# if self . _constraints : #NEWLINE# #INDENT# table = self . _related . get_table ( ) #NEWLINE# self . _query . where ( ( '%s.%s' % ( table , self . _other_key ) ) , '=' , getattr ( self . _parent , self . _foreign_key ) )