Google Mail Calendar Documents Reader Web more »
Recently Visited Groups | Help | Sign in
Google Groups Home
Message from discussion Problems using the i18n Behaviour with schemas in PostgreSQL
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
 
Nei Rauni Santos  
View profile   Translate to Translated (View Original)
 More options 22 June, 21:40
From: Nei Rauni Santos <nra...@gmail.com>
Date: Mon, 22 Jun 2009 13:40:49 -0700 (PDT)
Local: Mon 22 June 2009 21:40
Subject: Re: Problems using the i18n Behaviour with schemas in PostgreSQL
The error is:

Couldn't hydrate. Found non-unique key mapping named 'lang'.

On 22 jun, 17:39, Nei Rauni Santos <nra...@gmail.com> wrote:

> Guys,

> I'm having problems with innerJoins with i18n tables, the doctrine not
> putting the schema name in front table names..

> my query is:

>  //busca as amenidades do hotel
>     $q = new Doctrine_Query();
>     $q->from('HotelFacility hf')
>       ->innerJoin('hf.HotelFacilityType hft')
>       ->innerJoin('hf.FacilityType ft')
>      # ->innerJoin('hft.Translation hft8')
>      # ->innerJoin('ft.Translation fttran')
>       ->where('hf.hotel_id = ? and hf.value IS TRUE ', $this->id );

> It's generating the sql:

> SELECT
> b.hotel_facility_type_id AS b__hotel_facility_type_id,
> b.hotel_id AS b__hotel_id, b.facility_type_id AS b__facility_type_id,
> b.value AS b__value, b2.id AS b2__id, b2.facility_type_id AS
> b2__facility_type_id,
> b2.type AS b2__type, b3.id AS b3__id
> FROM booking.hotel_facility b
> INNER JOIN booking.hotel_facility_type b2 ON b.hotel_facility_type_id
> = b2.id
> INNER JOIN booking.facility_type b3 ON b.facility_type_id = b3.id
> WHERE (b.hotel_id = ? AND b.value IS TRUE)

> but if I uncomment the innerJoin of translation tables, the table no
> include the booking ( schema )

> SELECT
> b.hotel_facility_type_id AS b__hotel_facility_type_id, b.hotel_id AS
> b__hotel_id, b.facility_type_id AS b__facility_type_id, b.value AS
> b__value,
> b2.id AS b2__id, b2.facility_type_id AS b2__facility_type_id, b2.type
> AS b2__type, b3.id AS b3__id,
> h.id AS h__id, h.name AS h__name, h.created_at AS h__created_at,
> h.updated_at AS h__updated_at,
> h.lang AS h__lang, f.id AS f__id, f.name AS f__name, f.created_at AS
> f__created_at,
> f.updated_at AS f__updated_at, f.lang AS f__lang
> FROM booking.hotel_facility b
> INNER JOIN booking.hotel_facility_type b2 ON b.hotel_facility_type_id
> = b2.id
> INNER JOIN booking.facility_type b3 ON b.facility_type_id = b3.id
> INNER JOIN hotel_facility_type_translation h ON b2.id = h.id ---- NOT
> USING SCHEMA
> INNER JOIN facility_type_translation f ON b3.id = f.id  ---- NOT USING
> SCHEMA
> WHERE (b.hotel_id = ? AND b.value IS TRUE)

> Is it a bug??

> HotelFacilityType:
>   tableName: booking.hotel_facility_type
>   actAs:
>     Timestampable: ~
>     I18n:
>       fields: [name, created_at, updated_at]
> ......

> FacilityType:
>   tableName: booking.facility_type
>   actAs:
>     Timestampable: ~
>     I18n:
>       fields: [name, created_at, updated_at]
> .......


    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