Hi,

I'm trying to use a custom DQL function with Symfony 2, but I'm unsure
how to register the function with the Doctrine configuration when
using Symfony 2.

I've setup my DQL function as explained here:
http://www.doctrine-project.org/blog/doctrine2-custom-dql-udfs

And I've discovered a setting "doctrine.orm.configuration_class" for
the Doctrine Configuration class defined here: /vendor/symfony/src/
Symfony/Bundle/DoctrineBundle/Resources/config/orm.xml

So I tried to create my own Doctrine Configuration class as follows:

use Doctrine\ORM\Configuration as Base;

namespace My;

use Doctrine\ORM\Configuration as Base;

class Configuration extends Base {

  public function __construct() {
    parent::__construct();

    $this->addCustomStringFunction('MATCH_AGAINST', 'My/
MatchAgainst");
  }

}

And then attempted to use this Configuration class by add the
following to /app/config/config.yml

        configuration_class: My\Configuration

But Symfony complains with the following error:

Unrecognized options "configuration_class" under "doctrine.orm"



Can anyone tell me how to use my custom function with Doctrine 2 in
Symfony 2?

Thanks,

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en

Reply via email to