Symfony2 Docrine ODM: dynamic collection name
<p>I'm using MongoDB Doctrine ODM on a Symfony 2 project. In the documents classes the mapping metadata are specified by annotations.
For example:</p>

<pre><code>    /**
     * @MongoDB\Document(collection="statistiche")
     */
</code></pre>

<p>The collection name in this way is hardcoded. I want to have dynamical collection name parameter, that can be readed from global parameters.yml Symfony file (and, consequently, can be configured by user). How can I perform this goal? Thanks.</p>