public function create($pid, $attrs = [])
    {
        $table = $this->getTable();

        $newUid = 'NEW_' . uniqid($table);

        $this->dh->stripslashes_values = 0;
        $this->dh->start([
            $table => [
                $newUid => array_merge($attrs, ['pid' => $pid])
            ]
        ], null);
        $this->dh->process_datamap();

        if (isset($this->dh->substNEWwithIDs[$newUid])) {
            return $this->dh->substNEWwithIDs[$newUid];
        } else {
            return null;
        }
    }