@@ -270,102 +270,6 @@ Full Default Configuration
270270 </doctrine : config >
271271 </container >
272272
273- Configuration Overview
274- ----------------------
275-
276- This following configuration example shows all the configuration defaults
277- that the ORM resolves to:
278-
279- .. code-block :: yaml
280-
281- doctrine :
282- orm :
283- auto_mapping : true
284- # the standard distribution overrides this to be true in debug, false otherwise
285- auto_generate_proxy_classes : false
286- proxy_namespace : Proxies
287- proxy_dir : ' %kernel.cache_dir%/doctrine/orm/Proxies'
288- default_entity_manager : default
289- metadata_cache_driver : array
290- query_cache_driver : array
291- result_cache_driver : array
292-
293- There are lots of other configuration options that you can use to overwrite
294- certain classes, but those are for very advanced use-cases only.
295-
296- Caching Drivers
297- ~~~~~~~~~~~~~~~
298-
299- The built-in types of caching drivers are: ``array ``, ``apc ``, ``apcu ``,
300- ``memcache ``, ``memcached ``, ``redis ``, ``wincache ``, ``zenddata `` and ``xcache ``.
301- There is a special type called ``service `` which lets you define the ID of your
302- own caching service.
303-
304- The following example shows an overview of the caching configurations:
305-
306- .. code-block :: yaml
307-
308- doctrine :
309- orm :
310- auto_mapping : true
311- # each caching driver type defines its own config options
312- metadata_cache_driver : apc
313- result_cache_driver :
314- type : memcache
315- host : localhost
316- port : 11211
317- instance_class : Memcache
318- # the 'service' type requires to define the 'id' option too
319- query_cache_driver :
320- type : service
321- id : my_doctrine_common_cache_service
322-
323- Mapping Configuration
324- ~~~~~~~~~~~~~~~~~~~~~
325-
326- Explicit definition of all the mapped entities is the only necessary
327- configuration for the ORM and there are several configuration options that
328- you can control. The following configuration options exist for a mapping:
329-
330- type
331- ....
332-
333- One of ``annotation ``, ``xml ``, ``yml ``, ``php `` or ``staticphp ``. This
334- specifies which type of metadata type your mapping uses.
335-
336- dir
337- ...
338-
339- Path to the mapping or entity files (depending on the driver). If this path
340- is relative it is assumed to be relative to the bundle root. This only works
341- if the name of your mapping is a bundle name. If you want to use this option
342- to specify absolute paths you should prefix the path with the kernel parameters
343- that exist in the DIC (for example ``%kernel.project_dir% ``).
344-
345- prefix
346- ......
347-
348- A common namespace prefix that all entities of this mapping share. This
349- prefix should never conflict with prefixes of other defined mappings otherwise
350- some of your entities cannot be found by Doctrine. This option defaults
351- to the bundle namespace + ``Entity ``, for example for an application bundle
352- called AcmeHelloBundle prefix would be ``Acme\HelloBundle\Entity ``.
353-
354- alias
355- .....
356-
357- Doctrine offers a way to alias entity namespaces to simpler, shorter names
358- to be used in DQL queries or for Repository access. When using a bundle
359- the alias defaults to the bundle name.
360-
361- is_bundle
362- .........
363-
364- This option is a derived value from ``dir `` and by default is set to ``true ``
365- if dir is relative proved by a ``file_exists() `` check that returns ``false ``.
366- It is ``false `` if the existence check returns ``true ``. In this case an
367- absolute path was specified and the metadata files are most likely in a
368- directory outside of a bundle.
369273
370274 .. index ::
371275 single: Configuration; Doctrine DBAL
@@ -492,8 +396,31 @@ service where ``[name]`` is the name of the connection.
492396
493397.. _DBAL documentation : http://docs.doctrine-project.org/projects/doctrine-dbal/en/latest/reference/configuration.html
494398
399+ Doctrine ORM Configuration
400+ --------------------------
401+
402+ This following configuration example shows all the configuration defaults
403+ that the ORM resolves to:
404+
405+ .. code-block :: yaml
406+
407+ doctrine :
408+ orm :
409+ auto_mapping : true
410+ # the standard distribution overrides this to be true in debug, false otherwise
411+ auto_generate_proxy_classes : false
412+ proxy_namespace : Proxies
413+ proxy_dir : ' %kernel.cache_dir%/doctrine/orm/Proxies'
414+ default_entity_manager : default
415+ metadata_cache_driver : array
416+ query_cache_driver : array
417+ result_cache_driver : array
418+
419+ There are lots of other configuration options that you can use to overwrite
420+ certain classes, but those are for very advanced use-cases only.
421+
495422Shortened Configuration Syntax
496- ------------------------------
423+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
497424
498425When you are only using one entity manager, all config options available
499426can be placed directly under ``doctrine.orm `` config level.
@@ -525,8 +452,82 @@ can be placed directly under ``doctrine.orm`` config level.
525452 This shortened version is commonly used in other documentation sections.
526453Keep in mind that you can't use both syntaxes at the same time.
527454
455+ Caching Drivers
456+ ~~~~~~~~~~~~~~~
457+
458+ The built-in types of caching drivers are: ``array ``, ``apc ``, ``apcu ``,
459+ ``memcache ``, ``memcached ``, ``redis ``, ``wincache ``, ``zenddata `` and ``xcache ``.
460+ There is a special type called ``service `` which lets you define the ID of your
461+ own caching service.
462+
463+ The following example shows an overview of the caching configurations:
464+
465+ .. code-block :: yaml
466+
467+ doctrine :
468+ orm :
469+ auto_mapping : true
470+ # each caching driver type defines its own config options
471+ metadata_cache_driver : apc
472+ result_cache_driver :
473+ type : memcache
474+ host : localhost
475+ port : 11211
476+ instance_class : Memcache
477+ # the 'service' type requires to define the 'id' option too
478+ query_cache_driver :
479+ type : service
480+ id : my_doctrine_common_cache_service
481+
482+ Mapping Configuration
483+ ~~~~~~~~~~~~~~~~~~~~~
484+
485+ Explicit definition of all the mapped entities is the only necessary
486+ configuration for the ORM and there are several configuration options that
487+ you can control. The following configuration options exist for a mapping:
488+
489+ type
490+ ....
491+
492+ One of ``annotation ``, ``xml ``, ``yml ``, ``php `` or ``staticphp ``. This
493+ specifies which type of metadata type your mapping uses.
494+
495+ dir
496+ ...
497+
498+ Path to the mapping or entity files (depending on the driver). If this path
499+ is relative it is assumed to be relative to the bundle root. This only works
500+ if the name of your mapping is a bundle name. If you want to use this option
501+ to specify absolute paths you should prefix the path with the kernel parameters
502+ that exist in the DIC (for example ``%kernel.project_dir% ``).
503+
504+ prefix
505+ ......
506+
507+ A common namespace prefix that all entities of this mapping share. This
508+ prefix should never conflict with prefixes of other defined mappings otherwise
509+ some of your entities cannot be found by Doctrine. This option defaults
510+ to the bundle namespace + ``Entity ``, for example for an application bundle
511+ called AcmeHelloBundle prefix would be ``Acme\HelloBundle\Entity ``.
512+
513+ alias
514+ .....
515+
516+ Doctrine offers a way to alias entity namespaces to simpler, shorter names
517+ to be used in DQL queries or for Repository access. When using a bundle
518+ the alias defaults to the bundle name.
519+
520+ is_bundle
521+ .........
522+
523+ This option is a derived value from ``dir `` and by default is set to ``true ``
524+ if dir is relative proved by a ``file_exists() `` check that returns ``false ``.
525+ It is ``false `` if the existence check returns ``true ``. In this case an
526+ absolute path was specified and the metadata files are most likely in a
527+ directory outside of a bundle.
528+
528529Custom Mapping Entities in a Bundle
529- -----------------------------------
530+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
530531
531532Doctrine's ``auto_mapping `` feature loads annotation configuration from
532533the ``Entity/ `` directory of each bundle *and * looks for other formats (e.g.
@@ -587,7 +588,7 @@ directory instead:
587588 ));
588589
589590 Mapping Entities Outside of a Bundle
590- ------------------------------------
591+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
591592
592593You can also create new mappings, for example outside of the Symfony folder.
593594
@@ -652,7 +653,7 @@ namespace in the ``src/Entity`` directory and gives them an ``App`` alias
652653 ));
653654
654655 Detecting a Mapping Configuration Format
655- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
656+ ........................................
656657
657658If the ``type `` on the bundle configuration isn't set, the DoctrineBundle
658659will try to detect the correct mapping configuration format for the bundle.
@@ -671,7 +672,7 @@ root directory. If the folder exist, Doctrine will fall back to using an
671672annotation driver.
672673
673674Default Value of Dir
674- ~~~~~~~~~~~~~~~~~~~~
675+ ....................
675676
676677If ``dir `` is not specified, then its default value depends on which configuration
677678driver is being used. For drivers that rely on the PHP files (annotation,
0 commit comments