Doctrine 2 - ORM
  1. Doctrine 2 - ORM
  2. DDC-492

Doctrine\ORM\Query\TreeWalkerAdapter needs to provide access to private $_query member

    Details

    • Type: Improvement Improvement
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.0-BETA1
    • Fix Version/s: 2.0-BETA1
    • Component/s: ORM
    • Security Level: All
    • Labels:
      None

      Description

      I've been working on a pagination implementation that works properly for fetch-joined relations. To do this, I've been working with custom tree walkers.

      I hit a roadblock when I needed access to the query hints from within my concrete TreeWalker. Since they are not in the AST, the only way to get at them is through the Query object. However, this is private on TreeWalkerAdapter, and cannot be accessed.

      I propose adding a protected _getQuery() method to TreeWalkerAdapter to facilitate this.

        Activity

        Hide
        David Abdemoulaie added a comment -

        Obviously this is trivial to implement, so I can commit what I have. If tests are needed I'll need to write those however. I usually don't test trivial, protected accessors.

        Show
        David Abdemoulaie added a comment - Obviously this is trivial to implement, so I can commit what I have. If tests are needed I'll need to write those however. I usually don't test trivial, protected accessors.
        Hide
        Benjamin Eberlei added a comment -

        Implemented, also allowed access to ParserResult.

        Show
        Benjamin Eberlei added a comment - Implemented, also allowed access to ParserResult.

          People

          • Assignee:
            Benjamin Eberlei
            Reporter:
            David Abdemoulaie
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: