src/Colorium/Orm/Mapper/Query.php
public function add($values)
    {
        if(is_object($values)) {
            $values = get_object_vars($values);
        }
        elseif(!is_array($values)) {
            $values = (array)$values;
        }

        list($sql, $values) = SQL::insert($this->entity->name, $values);

        return $this->execute($sql, $values, function() {
            return $this->pdo->lastInsertId();
        });
    }
public function add($values)
    {
        if(is_object($values)) {
            $values = get_object_vars($values);
        }
        elseif(!is_array($values)) {
            $values = (array)$values;
        }

        list($sql, $values) = SQL::insert($this->entity->name, $values);

        return $this->execute($sql, $values, function() {
            return $this->pdo->lastInsertId();
        });
    }
Add record

@param mixed $values
@return int