Uploaded image for project: 'Doctrine PHPCR'
  1. Doctrine PHPCR
  2. PHPCR-65

find with uuid creates duplicate of document

    Details

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

      Description

      i am pretty sure the DocumentManager::find() method creates a duplicate document each time you request the document by uuid. it should not just load the node but convert that node to a path and then do the check if the document is cached. if the node is already cached the lookup by uuid is cheap. if not, it is now cached and the lookup by path is cheap. so no overhead, but eliminate the risk of having several instances of the same document.

      https://github.com/doctrine/phpcr-odm/blob/master/lib/Doctrine/ODM/PHPCR/DocumentManager.php#L279

        Activity

        dbu David Buchmann created issue -
        Show
        lsmith Lukas Kahwe added a comment - this issue seems to be fixed https://github.com/doctrine/phpcr-odm/blob/master/lib/Doctrine/ODM/PHPCR/DocumentManager.php#L289
        Hide
        dbu David Buchmann added a comment -

        thanks, looks good to me now.

        Show
        dbu David Buchmann added a comment - thanks, looks good to me now.
        dbu David Buchmann made changes -
        Field Original Value New Value
        Status Open [ 1 ] Closed [ 6 ]
        Resolution Fixed [ 1 ]

        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={expand=changesets[0:20].revisions[0:29],reviews, query=PHPCR-65}, methodType=GET}] : Received status code 503 (Service Temporarily Unavailable)

          People

          • Assignee:
            lsmith Lukas Kahwe
            Reporter:
            dbu David Buchmann
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: