Doctrine PHPCR
  1. Doctrine PHPCR
  2. PHPCR-1

children/child annotation add value later

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Labels:
      None

      Description

      when using the child annotation, it is not possible to assign a child document with a child of its own after persisting the parent document. to reproduce, take the Functional/FileTest.php and change
      $parent->file = new File();
      $parent->id = '/functional/filetest';
      $parent->file->setFileContentFromFilesystem(dirname(_FILE_) .'/_files/foo.txt');

      $this->dm->persist($parent);

      to
      $parent->id = '/functional/filetest';
      $this->dm->persist($parent);

      $parent->file = new File();
      $parent->file->setFileContentFromFilesystem(dirname(_FILE_) .'/_files/foo.txt');

      you will get "mandatory child node

      {http://www.jcp.org/jcr/1.0}

      content does not exist"

        Activity

        Hide
        David Buchmann added a comment -

        probably related is the issue that updating the normal properties of a child is not stored into phpcr.

        Show
        David Buchmann added a comment - probably related is the issue that updating the normal properties of a child is not stored into phpcr.
        Show
        David Buchmann added a comment - https://github.com/doctrine/phpcr-odm/pull/50

          People

          • Assignee:
            Jordi Boggiano
            Reporter:
            David Buchmann
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: