hi
i'm on a similar problem
here is a part of my .yml file :

  membre:
    _attributes:        { phpName: Membre }
    id:
    operateur_id:       { type: integer, default: 1, primaryKey:
false, foreignTable: operateur, foreignReference: id, required: true }
    prospect_type:      { type: integer, default: 1, primaryKey:
false, foreignTable: type_prospect, foreignReference: id, required:
true  }

  type_prospect:
    _attributes:       { phpName: TypeProspect }
    id:

  type_prospect_i18n:
    _attributes:       { phpName: TypeProspectI18n }
    type:              { type: varchar(64) }

in TypeProspect.php i add the fonction :
  public function __toString()
  {
  $culture = 'fr_FR';
  $c = new Criteria();
  $result = TypeProspectPeer::doSelectWithI18n($c,$culture);
  $type = $this -> getType($result);
    return $type;
  }

but il my backend admin, y get this error :
Fatal error: Method TypeProspect::__toString() must return a string
value

i tryed wit TypeProspect::getType instead of $this-> but i didn'nt
manage to get what i want
i've been searching around all the afternoon, could you hepl me to see
what i forgot ?


On 4 mai, 12:58, "Tristan Rivoallan" <[EMAIL PROTECTED]>
wrote:
> On 5/4/07, OphyTe <[EMAIL PROTECTED]> wrote:
>
> > But I have a blank field instead !!!
> > I have a default culture defined and it seems to work :
> > "<?php echo $this->getContext()->getUser()->getCulture () ?>" return
> > "fr_FR" and debug mode in Symfony shows "fr_FR" in global's variables.
>
> > Please help me, I spin around for 2 weeks now :-(
>
> you have to change peer_method used to select records to
> 'doSelectWithI18n'  so that joins with the i18n table are done.
>
> ++
> tristan


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

Reply via email to