title: Twig template can not find id : "Some mandatory parameters are missing ("id")
body: <p>I can not find the reason for the error:</p>
  
  <p>An exception has been thrown during the rendering of a template ("Some mandatory parameters are missing ("id") to generate a URL for route "event_show".") in MeetingBundle:Event:ev_index.html.twig at line 25. </p>
  
  <p>C:\Bitnami\wampstack-5.5.30-0\sym_prog\proj2_27\src\MeetingBundle\Controller\EventController.php</p>
  
  <pre><code>/**
   * Event controller.
   *
   * @Route("/event")
   */
  class EventController extends Controller
  {
  
      /**
       * Lists all Event entities.
       *
       * @Route("/", name="event_index")
       * @Method("GET")
       * @Template("MeetingBundle:Event:ev_index.html.twig")
       */
      public function indexAction()
      {
          $em = $this-&gt;getDoctrine()-&gt;getManager();
  
          $entities = $em-&gt;getRepository('MeetingBundle:Event')-&gt;findAll();
  
          dump($entities); //there are 19 lines in the table
  
          return array(
              'events' =&gt; $entities,
          );
      }
  </code></pre>
  
  <p>C:\Bitnami\wampstack-5.5.30-0\sym_prog\proj2_27\src\MeetingBundle\Resources\views\event\ev_index.html.twig</p>
  
  <pre><code>{% block body %}
      &lt;h1&gt;Event list&lt;/h1&gt;
      &lt;table&gt;
  
              {# empty array evaluates to false, http://twig.sensiolabs.org/doc/tags/if.html #}
      {% if events is not null %}
          {% for event in events %}
              &lt;tr&gt;
                  {% if event.id is not null %}  
                      &lt;td&gt;&lt;a href="{{ path('event_show', { 'event_id': event.id }) }}"&gt;{{ event.id }}&lt;/a&gt;&lt;/td&gt; 
                  {% endif %}
  
                  &lt;td&gt;{{ event.title }} &lt;/td&gt;
  ...
         {% endfor %}
   {% endif %}
      &lt;/table&gt;
  {% endblock %}
  </code></pre>
  
  <p>Function dump result is :</p>
  
  <pre><code>array:19 [▼
    0 =&gt; Event {#1212 ▼
      -id: 1
      -title: "title1"
      -keywords: ""
      -starttime: DateTime {#1209 ▶}
      -endtime: null
      -details: null
      -address: ""
      #latitude: null
      #longitude: null
      #street: null
      #number: null
      #city: null
      #country: null
      #state: null
      #zip: null
      #admins: PersistentCollection {#1219 ▶}
      #attendees: PersistentCollection {#1232 ▶}
      #comments: PersistentCollection {#1275 ▶}
    }
    1 =&gt; Event {#1278 ▶}
    2 =&gt; Event {#1286 ▶}
    3 =&gt; Event {#1294 ▶}
    4 =&gt; Event {#1302 ▶}
    5 =&gt; Event {#1310 ▶}
    6 =&gt; Event {#1318 ▶}
    7 =&gt; Event {#1326 ▶}
    8 =&gt; Event {#1334 ▶}
    9 =&gt; Event {#1342 ▶}
    10 =&gt; Event {#1350 ▶}
    11 =&gt; Event {#1358 ▶}
    12 =&gt; Event {#1366 ▶}
    13 =&gt; Event {#1374 ▶}
    14 =&gt; Event {#1382 ▶}
    15 =&gt; Event {#1390 ▶}
    16 =&gt; Event {#1398 ▶}
    17 =&gt; Event {#1406 ▶}
    18 =&gt; Event {#1414 ▶}
  ]
  </code></pre>