Google Mail Calendar Documents Reader Web more »
Recently Visited Groups | Help | Sign in
Google Groups Home
Message from discussion Using a join in query with no relation in schema

View Parsed - Show only message text

MIME-Version: 1.0
Received: by 10.100.142.4 with SMTP id p4mr1916992and.23.1247039705823; Wed, 
	08 Jul 2009 00:55:05 -0700 (PDT)
Date: Wed, 8 Jul 2009 00:55:05 -0700 (PDT)
In-Reply-To: <e52c06b30907071803k61a446a9p743e6cdd3e06fff5@mail.gmail.com>
X-IP: 84.38.85.66
References: <03445f17-3e17-46ae-957f-98a4185cd2d9@s31g2000yqs.googlegroups.com> 
	<e52c06b30907071803k61a446a9p743e6cdd3e06fff5@mail.gmail.com>
User-Agent: G2/1.0
X-HTTP-UserAgent: Opera/9.80 (Windows NT 5.1; U; pl) Presto/2.2.15 
	Version/10.00,gzip(gfe),gzip(gfe)
Message-ID: <5644dc4a-9284-4a1a-b815-b1ad41fe3f1a@y19g2000yqy.googlegroups.com>
Subject: Re: Using a join in query with no relation in schema
From: eXtreme <jacek.jedrzejew...@gmail.com>
To: doctrine-user <doctrine-user@googlegroups.com>
Content-Type: text/plain; charset=ISO-8859-7
Content-Transfer-Encoding: quoted-printable

In DQL.. you should. :P

On 8 Lip, 03:03, Tom Boutell <t...@punkave.com> wrote:
> You shouldn't need a relation to do a "from with commas" implicit join
> like this one. Your code would work just the way you wrote it. Except
> that in your schema, cars is plural, and in your code it is singular.
> You should change cars to Car in your schema.yml.
>
> You should also be consistent about your capitalization although that
> might not be a dealbreaker.
>
> 2009/7/7 Chtipepere <chtipep...@gmail.com>:
>
>
>
>
>
>
>
> > Hi everybody,
> > I'm quite new to Doctrine, and I'm trying that :
>
> > return Doctrine_Query::create()
> > =A0->select('News.*, Car.*')
> > =A0->from('News, Car')
> > =A0->where('News.object =3D ? and Car.id =3D News.object_id', 'Car')
> > =A0->execute();
>
> > schema.yml:
> > cars:
> > =A0name: =A0string
>
> > news:
> > =A0title: =A0string
> > =A0object: =A0string
> > =A0objec_id: string
>
> > In the schema, there's no relation between news and car, because I
> > want to use news for other object (like moto for exemple), and I'm not
> > that good to create a behavior.
>
> > Here's the error :
> > "Car" with an alias of "Car" in your query does not reference the
> > parent component it is related to.
>
> > If anyone can help... ?
>
> > thanks in advance to everyone.
>
> > =F0R
>
> --
> Tom Boutell
> P'unk Avenue
> 215 755 1330
> punkave.com

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2009 Google