public function insertTable($meta, $query)
    {
        $meta = $meta instanceof Meta ? $meta : $this->mapper->getMeta($meta);
        if (!$meta->canInsert) {
            throw new Exception("Class {$meta->class} prohibits insert");
        }

        $query = $query instanceof Query\Insert ? $query : new Query\Insert(['values'=>$query]);
        $query->values = $this->mapper->mapPropertiesToRow($meta, $query->values);
        if (!$query->table) {
            $query->table = $meta->table;
        }

        list ($sql, $params) = $query->buildQuery($meta);
        // no need to formatParams here - they're already field names

        $stmt = $this->getConnector()->prepare($sql);
        $stmt->execute($params);
        $lastInsertId = $this->getConnector()->lastInsertId();
        return $lastInsertId;
    }