mysql - YEAR() and MONTH() in Doctrine2 with Symfony 2.4 -
i've installed stofdoctrineextensionsbundle use sql functions month() , year() keep getting error:
attempted load class "month" namespace "doctrineextensions\query\mysql" in /var/www/symfony/vendor/doctrine/orm/lib/doctrine/orm/query/parser.php line 3389. need "use" namespace?
in controller have this:
$dql = "select x pfcfisiogestbundle:facturaemitida x month(x.fecha) between '".$mes_inicio."' , '".$mes_fin."' , year(x.fecha) = '".$ano."' order x.numero desc"; $querydefault = $em->createquery($dql);
and in config.yml
doctrine: dbal: driver: "%database_driver%" host: "%database_host%" port: "%database_port%" dbname: "%database_name%" user: "%database_user%" password: "%database_password%" charset: utf8 orm: auto_generate_proxy_classes: "%kernel.debug%" auto_mapping: true dql: string_functions: month: doctrineextensions\query\mysql\month year: doctrineextensions\query\mysql\year
what missing? :-(
that bundle sf2 wrapper behavioural doctrine extensions, different case yours
try orocrm/doctrine-extensions .. supports mysql , postgres ... should support other dbms in future
Comments
Post a Comment