>
http://www.doctrine-project.org/documentation/manual/1_1/en/dql-doctr...
> only report subquery support in FROM, SELECT, and WHERE statements.
> Maybe it just plain doesn't work in SET, yet?
> Derek
> On Jul 6, 3:23 am, mich <michaile...@gmail.com> wrote:
> > Anyone? What am I doing wrong?
> > On 3 июл, 22:58, mich <michaile...@gmail.com> wrote:
> > > I want to execute such sql:
> > > update blog_entry set comment_number = (select count(*) from
> > > blog_comment where blog_comment.root = blog_entry.id)
> > > How I can write such query in DQL? I tried:
> > > $q = Doctrine_Query::create()
> > > ->update('Blog_Entry Entry')
> > > ->set('Entry.comment_number', '(SELECT COUNT(Comment.id)
> > > FROM Entry.Blog_Comment Comment WHERE Comment.root = Entry.id)')
> > > ->execute()
> > > ;
> > > but it throws exception "Unknown component alias Comment".