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

Received: by 10.150.134.21 with SMTP id h21mr5156991ybd.9.1247015034023;
        Tue, 07 Jul 2009 18:03:54 -0700 (PDT)
Return-Path: <t...@punkave.com>
Received: from mail-yx0-f184.google.com (mail-yx0-f184.google.com [209.85.210.184])
        by gmr-mx.google.com with ESMTP id 19si735815yxe.2.2009.07.07.18.03.53;
        Tue, 07 Jul 2009 18:03:53 -0700 (PDT)
Received-SPF: neutral (google.com: 209.85.210.184 is neither permitted nor denied by best guess record for domain of t...@punkave.com) client-ip=209.85.210.184;
Authentication-Results: gmr-mx.google.com; spf=neutral (google.com: 209.85.210.184 is neither permitted nor denied by best guess record for domain of t...@punkave.com) smtp.mail=...@punkave.com
Received: by yxe14 with SMTP id 14so5473191yxe.8
        for <doctrine-user@googlegroups.com>; Tue, 07 Jul 2009 18:03:53 -0700 (PDT)
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-7
Content-Transfer-Encoding: quoted-printable
Received: by 10.231.33.12 with SMTP id f12mr1849622ibd.49.1247015033767; Tue, 
	07 Jul 2009 18:03:53 -0700 (PDT)
In-Reply-To: <03445f17-3e17-46ae-957f-98a4185cd2d9@s31g2000yqs.googlegroups.com>
References: <03445f17-3e17-46ae-957f-98a4185cd2d9@s31g2000yqs.googlegroups.com>
Date: Tue, 7 Jul 2009 21:03:53 -0400
Message-ID: <e52c06b30907071803k61a446a9p743e6cdd3e06fff5@mail.gmail.com>
Subject: Re: [doctrine-user] Using a join in query with no relation in schema
From: Tom Boutell <t...@punkave.com>
To: doctrine-user@googlegroups.com

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
> >
>



--=20
Tom Boutell
P'unk Avenue
215 755 1330
punkave.com
window.punkave.com

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