DDC-492: Doctrine\ORM\Query\TreeWalkerAdapter needs to provide access to private $_query member #613

Closed
opened 2026-01-22 12:44:35 +01:00 by admin · 3 comments
Owner

Originally created by @doctrinebot on GitHub (Apr 4, 2010).

Originally assigned to: @beberlei on GitHub.

Jira issue originally created by user @hobodave:

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.

Originally created by @doctrinebot on GitHub (Apr 4, 2010). Originally assigned to: @beberlei on GitHub. Jira issue originally created by user @hobodave: 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.
admin added the Improvement label 2026-01-22 12:44:35 +01:00
admin closed this issue 2026-01-22 12:44:36 +01:00
Author
Owner

@doctrinebot commented on GitHub (Apr 4, 2010):

Comment created by @hobodave:

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.

@doctrinebot commented on GitHub (Apr 4, 2010): Comment created by @hobodave: 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.
Author
Owner

@doctrinebot commented on GitHub (Apr 4, 2010):

Comment created by @beberlei:

Implemented, also allowed access to ParserResult.

@doctrinebot commented on GitHub (Apr 4, 2010): Comment created by @beberlei: Implemented, also allowed access to ParserResult.
Author
Owner

@doctrinebot commented on GitHub (Apr 4, 2010):

Issue was closed with resolution "Fixed"

@doctrinebot commented on GitHub (Apr 4, 2010): Issue was closed with resolution "Fixed"
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: doctrine/archived-orm#613