On 4 Fev, 14:52, Tom Ptacnik <to...@tomor.cz> wrote: > 1 st problem > try to do: > > protected function doUpdateObject($values) > { > print_r($values['id_empresa']); > > parent::doUpdateObject($values); > } >
Thanks i will try. > 2 nd > I don't understand what are you trying to do. And what does mean "they > are both foreign keys from same fields"? > > Probably you want to do something like: > > <tr> > <td>Created by</td> > <td><?php echo $info_empresa->getCreatedBy()->getUsername() ?></ > td> > <td>Updated by</td> > <td><?php echo $info_empresa->getUpdatedBy()->getUsername() ?></ > td> > </tr> I already try this and get always an error (Fatal error: Call to a member function getUsername() on a non-object) When i say that of foreign keys is because created_by and updated_by are related with id from table Users. Empresas: id .... created_by updated_by Users id username When i make $info_empresa->getUsers()->getUsername() how will symfony knows what related ID will get? The created or updated? -- You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-us...@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.