Uploaded image for project: 'Doctrine MongoDB ODM'
  1. Doctrine MongoDB ODM
  2. MODM-133

array keys with dots aren't persisted for Hash field

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Invalid
    • Affects Version/s: 1.0.0BETA3
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None
    • Environment:
      Macosx

      Description

      array keys with dots aren't persisted for Hash field

      in the attachment you will find a complete testcase.

      thanks.

      EDIT: use the second attachment

        Activity

        gordonslondon jules b created issue -
        gordonslondon jules b made changes -
        Field Original Value New Value
        Description It seems that array with keys which contains "." aren't persisted for Hash field

        <code>
        class MyDocument
        {
            /** @Hash */
            protected $var;

            public function setVar(array $var)
            {
                $this->var = $var;
            }
        }

        $doc = new MyDocument();
        $doc->var = array('.key' => array()); // don't work
        $doc->var = array('key' => array()): // work
        </code>

        It seems that array with keys which contains "." aren't persisted for Hash field

        class MyDocument
        {
            /** @Hash */
            protected $var;

            public function setVar(array $var)
            {
                $this->var = $var;
            }
        }

        $doc = new MyDocument();
        $doc->var = array('.key' => array()); // don't work
        $doc->var = array('key' => array()): // work

        gordonslondon jules b made changes -
        Description It seems that array with keys which contains "." aren't persisted for Hash field

        class MyDocument
        {
            /** @Hash */
            protected $var;

            public function setVar(array $var)
            {
                $this->var = $var;
            }
        }

        $doc = new MyDocument();
        $doc->var = array('.key' => array()); // don't work
        $doc->var = array('key' => array()): // work

        It seems that array with keys which contains "." aren't persisted for Hash field

        class MyDocument
        {
            /** @Hash */
            protected $var;

            public function setVar(array $var) {
                $this->var = $var;
            }
        }

        $doc = new MyDocument();
        $doc->var = array('.key' => array()); // don't work
        $doc->var = array('key' => array()): // work

        gordonslondon jules b made changes -
        Summary [Hash Field] field don't saved if "." in array key array keys with dots aren't persisted for Hash field
        Description It seems that array with keys which contains "." aren't persisted for Hash field

        class MyDocument
        {
            /** @Hash */
            protected $var;

            public function setVar(array $var) {
                $this->var = $var;
            }
        }

        $doc = new MyDocument();
        $doc->var = array('.key' => array()); // don't work
        $doc->var = array('key' => array()): // work

        array keys with dots aren't persisted for Hash field

        in the attachment you will find a complete testcase.

        thanks.
        Attachment MODM133.zip [ 10959 ]
        gordonslondon jules b made changes -
        Attachment MODM133.zip [ 10960 ]
        gordonslondon jules b made changes -
        Description array keys with dots aren't persisted for Hash field

        in the attachment you will find a complete testcase.

        thanks.
        array keys with dots aren't persisted for Hash field

        in the attachment you will find a complete testcase.

        thanks.




        EDIT: use the second attachment
        gordonslondon jules b made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Invalid [ 6 ]
        gordonslondon jules b made changes -
        Comment [ it seems that mongodb doesn't allow dots in keys.
        http://shift8creative.com/blog/creating-a-simple-and-efficient-rating-system-with-mongodb ]

          People

          • Assignee:
            jwage Jonathan H. Wage
            Reporter:
            gordonslondon jules b
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: