protected function _insertId($query)
{
$model = $query->model();
$field = $model::key();
$source = $model::meta('source');
$sequence = "{$source}_{$field}_seq";
$id = $this->connection->lastInsertId($sequence);
return $id && $id !== '0' ? $id : null;
}