Reputation:
I have two related tables called Budget and Client. The Budget's client
field is the foreign key that stores the Client's id. Symfony2 does something that when I print in a twig template the client
field, it automatically shows the name
of the Client table. How can I make it retrieve the identifier/number of the foreign key, accessing this client
field?
Upvotes: 0
Views: 276
Reputation: 1186
Assuming you've provided Getters & Setters for your Entity Classes, it should be as simple as:
{{ client.id }}
Upvotes: 1