From 778ed04eac753b7ead54d1d167d7677c2c2d2ff0 Mon Sep 17 00:00:00 2001 From: Karl Rixon Date: Tue, 17 Mar 2015 15:46:01 +0000 Subject: [PATCH] Support embeddables in partial object query expression [DDC-3621] --- lib/Doctrine/ORM/Query/Parser.php | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/lib/Doctrine/ORM/Query/Parser.php b/lib/Doctrine/ORM/Query/Parser.php index 93f07b171..442dbac80 100644 --- a/lib/Doctrine/ORM/Query/Parser.php +++ b/lib/Doctrine/ORM/Query/Parser.php @@ -1784,8 +1784,16 @@ class Parser while ($this->lexer->isNextToken(Lexer::T_COMMA)) { $this->match(Lexer::T_COMMA); $this->match(Lexer::T_IDENTIFIER); - - $partialFieldSet[] = $this->lexer->token['value']; + + $field = $this->lexer->token['value']; + + while ($this->lexer->isNextToken(Lexer::T_DOT)) { + $this->match(Lexer::T_DOT); + $this->match(Lexer::T_IDENTIFIER); + $field .= '.'.$this->lexer->token['value']; + } + + $partialFieldSet[] = $field; } $this->match(Lexer::T_CLOSE_CURLY_BRACE);