Movatterモバイル変換


[0]ホーム

URL:


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

Sign up
Appearance settings

Commit075f56c

Browse files
committed
[Doctrine] Exception note about functions with named managers
In case the managers were defined explicitly, the dql functions should also be defined over there.
1 parentfb8fd65 commit075f56c

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

‎doctrine/custom_dql_functions.rst‎

Lines 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)

[8]ページ先頭

©2009-2025 Movatter.jp