public function setReferences($references)
    {
        $this->_references = [];
        foreach ($references as $name => $ref) {
            if (!array_key_exists('key', $ref)) {
                $ref['key'] = 'id';
            }
            $this->_references[$name] = $ref;
        }
        return $this;
    }