Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit e222c57

Browse filesBrowse files
committed
minor #6961 [Doctrine] Exception note about functions with named managers (rvanlaak)
This PR was merged into the 2.7 branch. Discussion ---------- [Doctrine] Exception note about functions with named managers In case the managers were defined/named explicitly, the DQL functions should also be defined over there. Commits ------- 075f56c [Doctrine] Exception note about functions with named managers
2 parents 6d44ed8 + 075f56c commit e222c57
Copy full SHA for e222c57

File tree

Expand file treeCollapse file tree

1 file changed

+19
-0
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+19
-0
lines changed

‎doctrine/custom_dql_functions.rst

Copy file name to clipboardExpand all lines: doctrine/custom_dql_functions.rst
+19Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,4 +69,23 @@ In Symfony, you can register your custom DQL functions as follows:
6969
),
7070
));
7171
72+
.. note::
73+
74+
In case the ``entity_managers`` were named explicitly, configuring the functions with the
75+
orm directly will trigger the exception `Unrecognized option "dql" under "doctrine.orm"`.
76+
The `dql` configuration block must be defined under the named entity manager.
77+
78+
.. code-block:: yaml
79+
80+
# app/config/config.yml
81+
doctrine:
82+
orm:
83+
# ...
84+
entity_managers:
85+
example_manager:
86+
# Place your functions here
87+
dql:
88+
datetime_functions:
89+
test_datetime: AppBundle\DQL\DatetimeFunction
90+
7291
.. _`DQL User Defined Functions`: http://docs.doctrine-project.org/projects/doctrine-orm/en/latest/cookbook/dql-user-defined-functions.html

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.