the id comes from doing this:

    // now configure some parameter, do not forget leading slash if you want /projects/{id} and not /projects{id}
    $route->setVariablePattern('/{id}');
    $route->setRequirement('id', '\d+');
    $route->setDefault('id', 1);

the provider for phpcr-odm lives here: https://github.com/symfony-cmf/RoutingBundle/blob/master/Document/RouteProvider.php