From 075f56c6b362442e580dcec1f9034a9ee58df96e Mon Sep 17 00:00:00 2001 From: Richard van Laak Date: Mon, 12 Sep 2016 15:33:37 +0200 Subject: [PATCH] [Doctrine] Exception note about functions with named managers In case the managers were defined explicitly, the dql functions should also be defined over there. --- doctrine/custom_dql_functions.rst | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/doctrine/custom_dql_functions.rst b/doctrine/custom_dql_functions.rst index 747a353e7a5..5d7ea7617a8 100644 --- a/doctrine/custom_dql_functions.rst +++ b/doctrine/custom_dql_functions.rst @@ -69,4 +69,23 @@ In Symfony, you can register your custom DQL functions as follows: ), )); +.. note:: + + In case the ``entity_managers`` were named explicitly, configuring the functions with the + orm directly will trigger the exception `Unrecognized option "dql" under "doctrine.orm"`. + The `dql` configuration block must be defined under the named entity manager. + +.. code-block:: yaml + + # app/config/config.yml + doctrine: + orm: + # ... + entity_managers: + example_manager: + # Place your functions here + dql: + datetime_functions: + test_datetime: AppBundle\DQL\DatetimeFunction + .. _`DQL User Defined Functions`: http://docs.doctrine-project.org/projects/doctrine-orm/en/latest/cookbook/dql-user-defined-functions.html pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy