Doctrine PHPCR
  1. Doctrine PHPCR
  2. PHPCR-87

the document manager did not return a result for findBy(array('id' => 'some/id')) but does for find('some/id')

    Details

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

      Activity

      Hide
      David Buchmann added a comment -

      the id is kind of a meta information of the document, not a property. so i am unsure if this can work, as the findBy is querying on the phpcr fields. we can not search on the odm mapped fields, as we do not know which document to search, and different documents could even map differently.

      so i am not sure if we can solve this issue at all, except improve the documentation of what findBy is actually using.

      or am i missing something, lukas?

      Show
      David Buchmann added a comment - the id is kind of a meta information of the document, not a property. so i am unsure if this can work, as the findBy is querying on the phpcr fields. we can not search on the odm mapped fields, as we do not know which document to search, and different documents could even map differently. so i am not sure if we can solve this issue at all, except improve the documentation of what findBy is actually using. or am i missing something, lukas?
      Hide
      David Buchmann added a comment -

      findBy filters on properties. the id is the path of the node, not a property. this is thus not a bug.

      i converted a lot of doc from the orm to have the right place where we should explain this, adding a warning about this case: https://github.com/doctrine/phpcr-odm-documentation/pull/24

      Show
      David Buchmann added a comment - findBy filters on properties. the id is the path of the node, not a property. this is thus not a bug. i converted a lot of doc from the orm to have the right place where we should explain this, adding a warning about this case: https://github.com/doctrine/phpcr-odm-documentation/pull/24

        People

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

          Dates

          • Created:
            Updated:
            Resolved: