Doctrine PHPCR
  1. Doctrine PHPCR
  2. PHPCR-78

Exception "Can't remove the protected property: jcr:created" on persist

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Labels:
      None
    • Environment:
      * phpcrodm #fc47314043805c1b8d1e998d534abec75874a8e5
      * jackalope #6de09e160a2d56b34d34e8120a254fbe46892fb7
      * jackalope-jackrabbit #3c4fb61bf0c0664d09ef520683842e6426c033e0

      Description

      When a Document contains a reference field (tested with @ReferenceMany(strategy="hard"), @ReferenceOne(strategy="hard")) and a "jcr:created" field in its metadata, then phpcr-odm try to update the protected field (jcr:created) to NULL on persist.

      Jackalope throws the following exception :

      [PHPCR\NodeType\ConstraintViolationException]
      Can't remove the protected property: jcr:created

        Activity

        Hide
        Lukas Kahwe added a comment -
        Show
        Lukas Kahwe added a comment - fixed by https://github.com/doctrine/phpcr-odm/pull/158
        Hide
        damien pitard added a comment - - edited
        Show
        damien pitard added a comment - - edited here's a functional test to reproduce the bug https://github.com/pitpit/phpcr-odm/commit/a7e1ba83d78771599181d2dee3c03c5163cf26e7

          People

          • Assignee:
            Lukas Kahwe
            Reporter:
            damien pitard
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: