def klass_with_custom_fields(name)
      # Rails.logger.debug "[CustomFields] klass_with_custom_fields #{self.send(name).metadata.klass} / #{self.send(name).metadata[:old_klass]}" if defined?(Rails) # DEBUG
      recipe    = self.custom_fields_recipe_for(name)
      _metadata = self.send(name).relation_metadata
      target    = _metadata[:original_klass] || _metadata.klass # avoid to use an already enhanced klass
      target.klass_with_custom_fields(recipe)
    end
def klass_with_custom_fields(name)
      # Rails.logger.debug "[CustomFields] klass_with_custom_fields #{self.send(name).metadata.klass} / #{self.send(name).metadata[:old_klass]}" if defined?(Rails) # DEBUG
      recipe    = self.custom_fields_recipe_for(name)
      _metadata = self.send(name).relation_metadata
      target    = _metadata[:original_klass] || _metadata.klass # avoid to use an already enhanced klass
      target.klass_with_custom_fields(recipe)
    end
Returns the class enhanced by the custom fields.
 Be careful, call this method only if the source class
 has been saved with success.

 @param [ String, Symbol ] name The name of the relation.

 @return [ Class ] The modified class.