From: "Jonathan Wage" <jonw...@gmail.com>
Date: Fri, 16 May 2008 14:01:03 -0500
Local: Fri 16 May 2008 20:01
Subject: Re: [doctrine-user] Re: Bug?
It is possible. Can you create a ticket and a failing test case? - Jon On Wed, May 14, 2008 at 2:14 PM, Alex <outroa...@gmail.com> wrote: -- > $query = Doctrine_Query::create()->select('c.*, u.*, > vc.*')->from('CommentItem c')->leftJoin('c.sfGuardUser u'); > if ($this->getUser()->isAuthenticated()) > { > $query->leftJoin('c.VoteComment vc WITH vc.user_id = > '.$this->getUser()->getId()); > } > Gives me > SELECT c.id AS c__id, c.user_id AS c__user_id, c.body AS c__body, > $query = Doctrine_Query::create()->from('CommentItem > Gives me > SELECT c.id AS c__id, c.lft AS c__lft, c.rgt AS c__rgt, c.level AS > I'm using $treeObject->setBaseQuery($query); > Could the treeObject be altering default Doctrine behavior? > On Wed, May 14, 2008 at 4:09 PM, Jonathan Wage <jonw...@gmail.com> wrote: >> Hmm. Are you sure about that? If you don't specify a select() in 1.0 it >> - Jon >> On Wed, May 14, 2008 at 1:24 PM, Alex <outroa...@gmail.com> wrote: >>> One more question. When must ->select() be added to a Doctrine_Query >>> Couldn't find anything about it in the manual. >>> Thanks for your help Jon! >>> - alex >>> On Wed, May 14, 2008 at 3:18 PM, Jonathan Wage <jonw...@gmail.com> >>>> It is good practice. You should always use them so that all values are >>>> - Jon >>>> On Wed, May 14, 2008 at 1:15 PM, Alex <outroa...@gmail.com> wrote: >>>>> Bingo! That worked. All DQL commands must be uppercased? What's the >>>>> On Wed, May 14, 2008 at 3:13 PM, Jonathan Wage <jonw...@gmail.com> >>>>>> Try capitalized WITH? Also I would use tokens in your query. ? instead >>>>>> - Jon >>>>>> On Wed, May 14, 2008 at 1:10 PM, Alex <outroa...@gmail.com> wrote: >>>>>>> $query = Doctrine_Query::create()->from('CommentItem >>>>>>> $treeObject = $commentTable->getTree(); >>>>>>> echo $treeObject->getBaseQuery()->getSqlQuery(); >>>>>>> Output is >>>>>>> "SELECT c.id AS c__id, c.lft AS c__lft, c.rgt AS c__rgt, c.level AS >>>>>>> Doctrine seems to be discarding my last leftJoin's with condition. Is >>>>>>> - Alex >>>>>> -- >>>>> -- >>>>> - Alex >>>> -- >>> -- >>> - Alex >> -- > -- > - Alex Jonathan Wage http://www.jwage.com http://www.centresource.com You must Sign in before you can post messages.
To post a message, you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
| ||||||||||||||