/**
  * Set the value of this column
  * @param mixed $val Value
  * @param bool $ignore_properties Ignore properties and use default set value
  */
 public function setValue($val, $ignore_properties = false)
 {
     // we can mark this column as changed to ensure proper update.
     if ($val !== $this->getValue()) {
         $this->valueChanged = true;
     }
     if (!$ignore_properties && $this->getProperties() & DatabaseColumnElement::COLUMN_SERIALIZE_VALUE) {
         $this->value = DatabaseColumnElement::SerializeArray($val);
     } else {
         $this->value = $val;
     }
     $this->value_needs_set = false;
 }
 /**
  * Add a column element from just constructor parameters with a custom column
  * to be loaded when relation is called
  * @param type $name
  * @param type $props
  * @param type $relation
  * @param type $custom_column
  */
 private function addColumnElementNoClassCustomRelation($name, $props = 0, $relation = "", $custom_column = "")
 {
     $column = new DatabaseColumnElement($name, $props, $relation);
     $column->setRelationalColumn($custom_column);
     $this->addColumnElement($column);
 }