Find the "alias" that you are using to reference those 2 models, and just do
a plain __toString in your *paiement table
Like
class paiment extends BasePaiment
{
public function __toString()
{
return $this->getPerson()->__toString();
}
}
*
On Tue, Jun 1, 2010 at 4:39 PM, safa boubekri <[email protected]>wrote:
> Hello,
>
> In my database, I've a table *paiement * that contains a foreign key *
> id_person * that refers to a table person.
>
> I've created a module with the admin generator for each one. I've modified
> the *generator.yml* of my module *phone* to replace the phone type *id_person
> * by the nom & prenom of personne
>
> how can i get nom & person in the Id pf person in the table paimenet
>
> thank you
>
>
>
> and implemented classically the __toString() method in my model for the
> person class:
>
> class Personne extends BasePersonne
> {
>
>
> public function __toString()
> {
> return $this->getNom().' '.$this->getPrenom();
> }
> }
>
>
> --
> If you want to report a vulnerability issue on symfony, please send it to
> security at symfony-project.com
>
> 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]<symfony-users%[email protected]>
> For more options, visit this group at
> http://groups.google.com/group/symfony-users?hl=en
>
--
Have a nice day!
Alecs
Certified ScrumMaster
P.S. If you are on a list, please don't contact me privatelly, unless i have
allowed to. Further messages will be ignored.
There are no cannibals alive! I have ate the last one yesterday ...
I am on web: http://www.alecslupu.ro/
I am on twitter: http://twitter.com/alecslupu
I am on linkedIn: http://www.linkedin.com/in/alecslupu
Tel: (+4)0722 621 280
--
If you want to report a vulnerability issue on symfony, please send it to
security at symfony-project.com
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