Doctrine MongoDB ODM
  1. Doctrine MongoDB ODM
  2. MODM-9

Unexpected: MappedSuperclass private property without annotation becomes persisted

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 1.0.0ALPHA1
    • Fix Version/s: 1.0.0ALPHA1
    • Component/s: None
    • Labels:
      None
    • Environment:
      OS X, latest ODM checkout

      Description

      /** @MappedSuperclass */
      class Model {
      
          private $errors = array();
      
          protected function getErrors() {
              return $this->errors;
          }
      }
      
      /**
       * @Document(db="mydb", collection="data")
       */
      class Data extends Model {
          /**
           * @Id
           */
          public $id;
      
          /**
           * @String
           */
          public $name;
      }
      

      Did not expect, that $errors goes into mongo.

        Activity

        Florian Kubis created issue -
        Jonathan H. Wage made changes -
        Field Original Value New Value
        Description /** @MappedSuperclass */
        class Model {

            private $errors = array();

            protected function getErrors() {
                return $this->errors;
            }
        }

        /**
         * @Document(db="mydb", collection="data")
         */
        class Data extends Model {
            /**
             * @Id
             */
            public $id;

            /**
             * @String
             */
            public $name;
        }

        Did not expect, that $errors goes into mongo.
        {code}
        /** @MappedSuperclass */
        class Model {

            private $errors = array();

            protected function getErrors() {
                return $this->errors;
            }
        }

        /**
         * @Document(db="mydb", collection="data")
         */
        class Data extends Model {
            /**
             * @Id
             */
            public $id;

            /**
             * @String
             */
            public $name;
        }
        {code}

        Did not expect, that $errors goes into mongo.
        Jonathan H. Wage made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Jonathan H. Wage made changes -
        Affects Version/s 1.0.0ALPHA1 [ 10064 ]
        Fix Version/s 1.0.0ALPHA1 [ 10064 ]

          People

          • Assignee:
            Jonathan H. Wage
            Reporter:
            Florian Kubis
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: