Last Updated: February 25, 2016
·
2.89K
· lsouza

MongoDB ODM Param Converter service

In order to get the Param Converter annotation to work with the doctrine ODM you must register a service that enables the ODM registry manager.

You just have to register a service like this:

my_bundle.converter.doctrine.mongodb:
    class: Sensio\Bundle\FrameworkExtraBundle\Request\ParamConverter\DoctrineParamConverter
    arguments: [@doctrine_mongodb]
    tags:
        - { name: request.param_converter }

1 Response
Add your response

What's the best option to get this working together with ORM ? Since this method will override that behavior.

over 1 year ago ·

Have a fresh tip? Share with Coderwall community!

Post
Post a tip
Did you know?

PHP applications still send a browser full of JavaScript. Hardening the server does not inventory the payment, analytics, and plugin scripts that run after the HTML is delivered.

Security insights from Cside