[symfony-users] Re: Doctrine I18n - Problem to get a localized value

2009-04-20 Thread Bertrand Zuchuat

Hello,

Add ->leftJoin('r.Translation t') in your query.

Bertrand

Le 20 avr. 09 à 17:01, FlyLM [ML] a écrit :

> When I run the request without specify the current culture, I can't  
> get any data with a ->getLabel() ou ->label
>
> [...]
>  $q = $this->createQuery('r')
>   ->where('r.room_type = ?')
>   ->andWhere('r.country_iso = ?');
> [...]
> ->getLabel => print nothing
> ->label => print nothing


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~--~~~~--~~--~--~---



[symfony-users] Re: Doctrine I18n - Problem to get a localized value

2009-04-20 Thread FlyLM [ML]
2009/4/20 Bertrand Zuchuat 

>
> Hello,
>
> Add ->leftJoin('r.Translation t') in your query.
>

But I can't access the localized value with "getLabel" method or "label"
object property.

I need to use the "Translation" associative array.

I thought that a proxy would automatically create a link between this
associative Translation array and the property or the value return by the
method of the objet.


>
> Bertrand
>
> Le 20 avr. 09 à 17:01, FlyLM [ML] a écrit :
>
> > When I run the request without specify the current culture, I can't
> > get any data with a ->getLabel() ou ->label
> >
> > [...]
> >  $q = $this->createQuery('r')
> >   ->where('r.room_type = ?')
> >   ->andWhere('r.country_iso = ?');
> > [...]
> > ->getLabel => print nothing
> > ->label => print nothing
>
>
> >
>

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~--~~~~--~~--~--~---



[symfony-users] Re: Doctrine I18n - Problem to get a localized value

2009-04-20 Thread FlyLM [ML]
I've found the mistake in "myUser.class.php". I try to change the culture
after the initizialisation of the user objet, but something goes wrong, and
after, impossible to change again the culture

When I comment the bad function in my User class, I can use getLabel or
label to get localized value of the column.

2009/4/20 FlyLM [ML] 

>
>
> 2009/4/20 Bertrand Zuchuat 
>
>>
>> Hello,
>>
>> Add ->leftJoin('r.Translation t') in your query.
>>
>
> But I can't access the localized value with "getLabel" method or "label"
> object property.
>
> I need to use the "Translation" associative array.
>
> I thought that a proxy would automatically create a link between this
> associative Translation array and the property or the value return by the
> method of the objet.
>
>
>>
>> Bertrand
>>
>> Le 20 avr. 09 à 17:01, FlyLM [ML] a écrit :
>>
>> > When I run the request without specify the current culture, I can't
>> > get any data with a ->getLabel() ou ->label
>> >
>> > [...]
>> >  $q = $this->createQuery('r')
>> >   ->where('r.room_type = ?')
>> >   ->andWhere('r.country_iso = ?');
>> > [...]
>> > ->getLabel => print nothing
>> > ->label => print nothing
>>
>>
>> >>
>>
>

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~--~~~~--~~--~--~---