Ok thanks, but I'm using the PR6, and with the following syntax (without the dql instructions) :
doctrine.orm: entity_managers: default: mappings: YamlBundle: ~ I've got this error : Fatal error: Uncaught exception 'Symfony\Component\Yaml\ParserException' with message 'Unable to parse line 28 ( mappings:).' i How can I solve this (without upgrading) ? Thanks ! Le 5 avr. 2011 à 17:23, Christophe COEVOET a écrit : > Le 05/04/2011 15:03, Christophe Beyer a écrit : >> I want to use the Doctrine function addCustomDatetimeFunction on my >> EntityManager. >> >> I tried this : >> >> $config = new \Doctrine\ORM\Configuration(); >> $config->addCustomDatetimeFunction('MONTH', >> 'Doctrine\ORM\Query\AST\Functions\Month'); // My custom function >> >> $em = $this->get('doctrine.orm.entity_manager', $config); >> >> It does nothing, but it seems logical because the $config parameter needs to >> be add on the Entity Manager creation function. >> >> Who can help me ? >> >> >> Thanks ! > Define it in the config: > > doctrine: > dbal: ~ > orm: > entity_managers: > default: > mappings: > YamlBundle: ~ > dql: > string_functions: > test_string: > Symfony\Bundle\DoctrineBundle\Tests\DependencyInjection\TestStringFunction > numeric_functions: > test_numeric: > Symfony\Bundle\DoctrineBundle\Tests\DependencyInjection\TestNumericFunction > datetime_functions: > test_datetime: > Symfony\Bundle\DoctrineBundle\Tests\DependencyInjection\TestDatetimeFunction > > -- > Christophe | Stof > > -- > 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 -- 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