Message from discussion
Using a join in query with no relation in schema
MIME-Version: 1.0
Received: by 10.100.5.16 with SMTP id 16mr299920ane.4.1247006030776; Tue, 07
Jul 2009 15:33:50 -0700 (PDT)
Date: Tue, 7 Jul 2009 15:33:50 -0700 (PDT)
X-IP: 85.169.193.220
User-Agent: G2/1.0
X-HTTP-UserAgent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; fr;
rv:1.9.1) Gecko/20090624 Firefox/3.5 GTB5 AutoPager/0.5.2.2
(http://www.teesoft.info/),gzip(gfe),gzip(gfe)
Message-ID: <03445f17-3e17-46ae-957f-98a4185cd2d9@s31g2000yqs.googlegroups.com>
Subject: Using a join in query with no relation in schema
From: Chtipepere <chtipep...@gmail.com>
To: doctrine-user <doctrine-user@googlegroups.com>
Content-Type: text/plain; charset=ISO-8859-7
Content-Transfer-Encoding: quoted-printable
Hi everybody,
I'm quite new to Doctrine, and I'm trying that :
return Doctrine_Query::create()
->select('News.*, Car.*')
->from('News, Car')
->where('News.object =3D ? and Car.id =3D News.object_id', 'Car')
->execute();
schema.yml:
cars:
name: string
news:
title: string
object: string
objec_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.