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

array keys with dots aren't persisted for Hash field

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major 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

        jules b created issue -
        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

        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

        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 ]
        jules b made changes -
        Attachment MODM133.zip [ 10960 ]
        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
        Hide
        jules b added a comment -
        Show
        jules b added a comment - it seems that mongodb doesn't allow dots in keys. http://shift8creative.com/blog/creating-a-simple-and-efficient-rating-system-with-mongodb
        jules b made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Invalid [ 6 ]
        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 ]

        This list may be incomplete, as errors occurred whilst retrieving source from linked applications:

        • Request to http://www.doctrine-project.org/fisheye/ failed: Error in remote call to 'FishEye 0 (http://www.doctrine-project.org/fisheye/)' (http://www.doctrine-project.org/fisheye) [AbstractRestCommand{path='/rest-service-fe/search-v1/crossRepositoryQuery', params={query=MODM-133, expand=changesets[0:20].revisions[0:29],reviews}, methodType=GET}] : Received status code 503 (Service Temporarily Unavailable)

          People

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

            Dates

            • Created:
              Updated:
              Resolved: