/**
  * Set the converters for a field.
  *
  * Setting is done per type (field or value), any existing conversions are overwritten.
  *
  * @param string                                               $fieldName
  * @param ValueConversionInterface|SqlFieldConversionInterface $converter
  *
  * @throws UnknownFieldException  When the field is not registered in the fieldset
  * @throws BadMethodCallException When the where-clause is already generated
  *
  * @return self
  */
 public function setConverter($fieldName, $converter)
 {
     if ($this->whereClause) {
         throw new BadMethodCallException('WhereBuilder configuration methods cannot be accessed anymore once the where-clause is generated.');
     }
     if (!$this->fieldSet->has($fieldName)) {
         throw new UnknownFieldException($fieldName);
     }
     if ($converter instanceof ValueConversionInterface) {
         $this->valueConversions[$fieldName] = $converter;
     }
     if ($converter instanceof SqlFieldConversionInterface) {
         $this->fieldConversions[$fieldName] = $converter;
     }
     return $this;
 }