Skip to content

Commit

Permalink
feature #3946 DQL custom functions on doctrine reference page (healdr…
Browse files Browse the repository at this point in the history
…opper)

This PR was submitted for the 2.5 branch but it was merged into the 2.3 branch instead (closes #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 ] (#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
  • Loading branch information
weaverryan committed Jul 2, 2014
2 parents 801c756 + d78478e commit 4a9e49e
Showing 1 changed file with 35 additions and 0 deletions.
35 changes: 35 additions & 0 deletions reference/configuration/doctrine.rst
Original file line number Diff line number Diff line change
Expand Up @@ -411,3 +411,38 @@ Each connection is also accessible via the ``doctrine.dbal.[name]_connection``
service where ``[name]`` is the name of the connection.

.. _DBAL documentation: http://docs.doctrine-project.org/projects/doctrine-dbal/en/latest/reference/configuration.html

Shortened Configuration Syntax
------------------------------

When you are only using one entity manager, all config options available
can be placed directly under ``doctrine.orm`` config level.

.. code-block:: yaml
doctrine:
orm:
# ...
query_cache_driver:
# ...
metadata_cache_driver:
# ...
result_cache_driver:
# ...
connection: ~
class_metadata_factory_name: Doctrine\ORM\Mapping\ClassMetadataFactory
default_repository_class: Doctrine\ORM\EntityRepository
auto_mapping: false
hydrators:
# ...
mappings:
# ...
dql:
# ...
filters:
# ...
This shortened version is commonly used in other documentation sections.
Keep in mind that you can't use both syntaxes at the same time.

.. _`DQL User Defined Functions`: http://docs.doctrine-project.org/projects/doctrine-orm/en/latest/cookbook/dql-user-defined-functions.html

0 comments on commit 4a9e49e

Please sign in to comment.