title: ZF2 segment child route not working
body: <p>What im trying to achieve:</p>
  
  <pre><code>domain.com/user                    = UserController::index
  domain.com/user/profile            = UserController::profile
  domain.com/user/profile/9          = UserController::profile (with query param id=9)
  domain.com/user/profile/9/edit     = UserController::editProfile (with query param id=9)
  </code></pre>
  
  <p>So i have the following route:</p>
  
  <pre><code>'user' =&gt; array(
      'type'    =&gt; 'Segment',
      'options' =&gt; array(
          'route'    =&gt; '/user',
          'defaults' =&gt; array(
              '__NAMESPACE__' =&gt; 'YrmUser\Controller',
              'controller'    =&gt; 'User',
              'action'        =&gt; 'index',
          ),
      ),
      'may_terminate' =&gt; true,
      'child_routes' =&gt; array(
          'profile' =&gt; array(
              'type'    =&gt; 'Segment',
              'options' =&gt; array(
                  'route'    =&gt; '/profile[/:id]',
                  'defaults' =&gt; array(
                      'action' =&gt; 'profile',
                  ),
                  'constraints' =&gt; array(
                      'id' =&gt; '[0-9]*'
                  ),
              ),
              'may_terminate' =&gt; true,
              'child_routes' =&gt; array(
                  'edit' =&gt; array(
                      'type'    =&gt; 'Segment',
                      'options' =&gt; array(
                          'route'    =&gt; '/edit',
                          'defaults' =&gt; array(
                              'action' =&gt; 'editProfile',
                          ),
                      ),
                      'may_terminate' =&gt; true
                  ),
              )
          ),
      )
  )
  </code></pre>
  
  <p>It kinda works, except for the fact that the query parameter ID never gets a value.
  Anyone who can tell me what i'm doing wrong, im guessing its something stupidly simple...</p>
  
  <p>Thanks in advance,</p>
  
  <p>Yrm</p>