/**
  * Sets a field to a value. The column parameter determines if the "name" is a field or column name.
  *
  * @param object $entity
  * @param string $name
  * @param mixed  $value
  * @param bool   $column
  * @param bool   $convert
  */
 public function setValue($entity, $name, $value, $column = false, $convert = false)
 {
     if ($column && isset($this->fieldNames[$name])) {
         $name = $this->fieldNames[$name];
     }
     if ($convert) {
         $platform = $this->manager->getConnection()->getDatabasePlatform();
         $value = Type::getType($this->fields[$name]['type'])->convertToPHPValue($value, $platform);
     }
     $this->reflFields[$name]->setValue($entity, $value);
 }