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
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Follow-up To:
Add Cc | Add Follow-up to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers that you hear
 
eXtreme  
View profile   Translate to Translated (View Original)
 More options 8 July, 08:55
From: eXtreme <jacek.jedrzejew...@gmail.com>
Date: Wed, 8 Jul 2009 00:55:05 -0700 (PDT)
Local: Wed 8 July 2009 08:55
Subject: Re: Using a join in query with no relation in schema
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()
> >  ->select('News.*, Car.*')
> >  ->from('News, Car')
> >  ->where('News.object = ? and Car.id = 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.

> > πR

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


    Reply to author    Forward  
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.

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