Skip to content

Update lib/Doctrine/ORM/Query/AST/SimpleSelectExpression.php#164

Closed
asm89 wants to merge 1 commit intodoctrine:masterfrom
asm89:patch-1
Closed

Update lib/Doctrine/ORM/Query/AST/SimpleSelectExpression.php#164
asm89 wants to merge 1 commit intodoctrine:masterfrom
asm89:patch-1

Conversation

@asm89
Copy link
Member

@asm89 asm89 commented Oct 21, 2011

A public property $hiddenAliasResultVariable was added to SelectExpression in ebe9338. It should also be added to SimpleSelectExpression to allow for more advanced custom query walking like here:
https://github.com/beberlei/DoctrineExtensions/blob/master/lib/DoctrineExtensions/Paginate/LimitSubqueryWalker.php#L71

Right now the missing property is causing a crash when using the Paginate extension of beberlei.

@beberlei
Copy link
Member

@guilhermeblanco your take
@asm89 can you add a test in TesTs/ORM/Query/Select...?

@guilhermeblanco
Copy link
Member

As discussed in IRC, this patch is wrong, because we can never have a hidden field in a subquery.
Also, even if we support that, it should be much more than this (changes in Parser.php would be required).

It seems it was a lib problem, not Doctrine's.

@asm89
Copy link
Member Author

asm89 commented Oct 21, 2011

@beberlei Talked with @guilhermeblanco and he doesn't like it, so i'll close it and send a PR to your extensions repository to update the failing code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants