def delegate_writer_to_inverse(attribute, inverse)
      prop = property(attribute)
      # nothing to do if no inverse
      inv_prop = prop.inverse_property || return
      logger.debug { "Delegating #{qp}.#{attribute} update to the inverse #{prop.type.qp}.#{inv_prop}..." }
      # redefine the write to set the dependent inverse
      redefine_method(prop.writer) do |old_writer|
        # delegate to the Jinx::Resource set_inverse method
        lambda { |dep| set_inverse(dep, old_writer, inv_prop.writer) }
      end
    end
def delegate_writer_to_inverse(attribute, inverse)
      prop = property(attribute)
      # nothing to do if no inverse
      inv_prop = prop.inverse_property || return
      logger.debug { "Delegating #{qp}.#{attribute} update to the inverse #{prop.type.qp}.#{inv_prop}..." }
      # redefine the write to set the dependent inverse
      redefine_method(prop.writer) do |old_writer|
        # delegate to the Jinx::Resource set_inverse method
        lambda { |dep| set_inverse(dep, old_writer, inv_prop.writer) }
      end
    end
Redefines the attribute writer method to delegate to its inverse writer.
 This is done to enforce inverse integrity.

 For a +Person+ attribute +account+ with inverse +holder+, this is equivalent to the following:
   class Person
     alias :set_account :account=
     def account=(acct)
       acct.holder = self if acct
       set_account(acct)
     end
   end