Skip to content

Commit 4a9e49e

Browse files
committed
feature symfony#3946 DQL custom functions on doctrine reference page (healdropper)
This PR was submitted for the 2.5 branch but it was merged into the 2.3 branch instead (closes symfony#3946). Discussion ---------- DQL custom functions on doctrine reference page Custom DQL functions can be configured in two ways, according to what I was told [ here ] (symfony#3939) It should be clearified in doctrine reference page because It may confuse some people that just read the cookbook section about [custom DQL functions] (http://symfony.com/doc/current/cookbook/doctrine/custom_dql_functions.html) Commits ------- 39957c5 Update doctrine.rst b4f3151 Update doctrine.rst 9536c17 Update doctrine.rst 044e1eb Update doctrine.rst 1ce3fcc Update doctrine.rst 4a046fa Update doctrine.rst 69efced Shorten syntax mention on doctrine reference 98dee12 Fixed broked link 95f53ae Update doctrine.rst b5f9ac0 Update doctrine.rst 2541f86 DQL custom functions on doctrine reference page
2 parents 801c756 + d78478e commit 4a9e49e

File tree

1 file changed

+35
-0
lines changed

1 file changed

+35
-0
lines changed

reference/configuration/doctrine.rst

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -411,3 +411,38 @@ Each connection is also accessible via the ``doctrine.dbal.[name]_connection``
411411
service where ``[name]`` is the name of the connection.
412412

413413
.. _DBAL documentation: http://docs.doctrine-project.org/projects/doctrine-dbal/en/latest/reference/configuration.html
414+
415+
Shortened Configuration Syntax
416+
------------------------------
417+
418+
When you are only using one entity manager, all config options available
419+
can be placed directly under ``doctrine.orm`` config level.
420+
421+
.. code-block:: yaml
422+
423+
doctrine:
424+
orm:
425+
# ...
426+
query_cache_driver:
427+
# ...
428+
metadata_cache_driver:
429+
# ...
430+
result_cache_driver:
431+
# ...
432+
connection: ~
433+
class_metadata_factory_name: Doctrine\ORM\Mapping\ClassMetadataFactory
434+
default_repository_class: Doctrine\ORM\EntityRepository
435+
auto_mapping: false
436+
hydrators:
437+
# ...
438+
mappings:
439+
# ...
440+
dql:
441+
# ...
442+
filters:
443+
# ...
444+
445+
This shortened version is commonly used in other documentation sections.
446+
Keep in mind that you can't use both syntaxes at the same time.
447+
448+
.. _`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)