[symfony-users] foreign key relations in admin generator

2010-03-17 Thread Mihai Rusoaie
Hello, all! Can you give me a hint on how can I display a name from a foreign table in the list display view in a generated backend. To be more precise, here is the schema: client: id: ~ name: { type: varchar(255), required: true, index: unique }

Re: [symfony-users] foreign key relations in admin generator

2010-03-17 Thread Arnold Ispan
Hello, In the client_name partial you could use: *echo $contract-getClient()-getName();* and in the generator.yml you could use: *display: [_client_name, .]* * * *or the second method would be to define a method in your Contract model class* * * *public function getClientName()* *{* *