@RSalo

PHPCR Как правильно создать ноду с пользователем?

Всем привет. При попытке создать документ для пользователя используя PHPCR получаю ошибку:
In NamespaceRegistry.php line 193:

Mapping for 'rep' is not defined

Сам документ и фикстура:
spoiler
/**
 * @Document(nodeType="rep:User")
 */
class UserDocument implements HierarchyInterface
{
    /**
     * @Id(strategy="parent")
     */
    private $id;

    /**
     * @Nodename()
     */
    private $nodeName;

    /**
     * @ParentDocument()
     */
    private $parent;

    /**
     * @Field(property="rep:password")
     */
    private $password;

    public function getId(): ?int
    {
        return $this->id;
    }

    public function getParent()
    {
        return $this->getParentDocument();
    }

    public function setParent($parent)
    {
        return $this->setParentDocument($parent);
    }

    public function getParentDocument()
    {
        return $this->parent;
    }

    public function setParentDocument($parent)
    {
        $this->parent = $parent;

        return $this;
    }

    /**
     * @return mixed
     */
    public function getNodeName()
    {
        return $this->nodeName;
    }

    /**
     * @param string $nodeName
     * @return ArticleDocument
     */
    public function setNodeName(string $nodeName)
    {
        $this->nodeName = $nodeName;

        return $this;
    }

    /**
     * @return mixed
     */
    public function getPassword()
    {
        return $this->password;
    }

    /**
     * @param mixed $password
     * @return ArticleDocument
     */
    public function setPassword($password): ArticleDocument
    {
        $this->password = $password;

        return $this;
    }
}

        $article = new UserDocument();
        $article->setParentDocument($members);
        $article->setNodeName('userNode');
        $article->setPassword('testPassword');

        $manager->persist($article);
        $manager->flush();

Это нужно отдельно регистрировать неймспейсы или чего-то не то делаю? Буду благодарен за подсказку.
  • Вопрос задан
  • 85 просмотров
Пригласить эксперта
Ваш ответ на вопрос

Войдите, чтобы написать ответ

Войти через центр авторизации
Похожие вопросы