@@ -273,106 +273,6 @@ Full Default Configuration
273273 </doctrine : config >
274274 </container >
275275
276- Configuration Overview
277- ----------------------
278-
279- This following configuration example shows all the configuration defaults
280- that the ORM resolves to:
281-
282- .. code-block :: yaml
283-
284- doctrine :
285- orm :
286- auto_mapping : true
287- # the standard distribution overrides this to be true in debug, false otherwise
288- auto_generate_proxy_classes : false
289- proxy_namespace : Proxies
290- proxy_dir : ' %kernel.cache_dir%/doctrine/orm/Proxies'
291- default_entity_manager : default
292- metadata_cache_driver : array
293- query_cache_driver : array
294- result_cache_driver : array
295-
296- There are lots of other configuration options that you can use to overwrite
297- certain classes, but those are for very advanced use-cases only.
298-
299- Caching Drivers
300- ~~~~~~~~~~~~~~~
301-
302- For the caching drivers you can specify the values ``array ``, ``apc ``, ``apcu ``,
303- ``memcache ``, ``memcached ``, ``redis ``, ``wincache ``, ``zenddata ``, ``xcache ``
304- or ``service ``.
305-
306- The following example shows an overview of the caching configurations:
307-
308- .. code-block :: yaml
309-
310- doctrine :
311- orm :
312- auto_mapping : true
313- metadata_cache_driver : apc
314- query_cache_driver :
315- type : service
316- id : my_doctrine_common_cache_service
317- result_cache_driver :
318- type : memcache
319- host : localhost
320- port : 11211
321- instance_class : Memcache
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.root_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.
369-
370- .. index ::
371- single: Configuration; Doctrine DBAL
372- single: Doctrine; DBAL configuration
373-
374- .. _`reference-dbal-configuration` :
375-
376276 Doctrine DBAL Configuration
377277---------------------------
378278
@@ -493,8 +393,31 @@ service where ``[name]`` is the name of the connection.
493393
494394.. _DBAL documentation : http://docs.doctrine-project.org/projects/doctrine-dbal/en/latest/reference/configuration.html
495395
396+ Doctrine ORM Configuration
397+ --------------------------
398+
399+ This following configuration example shows all the configuration defaults
400+ that the ORM resolves to:
401+
402+ .. code-block :: yaml
403+
404+ doctrine :
405+ orm :
406+ auto_mapping : true
407+ # the standard distribution overrides this to be true in debug, false otherwise
408+ auto_generate_proxy_classes : false
409+ proxy_namespace : Proxies
410+ proxy_dir : ' %kernel.cache_dir%/doctrine/orm/Proxies'
411+ default_entity_manager : default
412+ metadata_cache_driver : array
413+ query_cache_driver : array
414+ result_cache_driver : array
415+
416+ There are lots of other configuration options that you can use to overwrite
417+ certain classes, but those are for very advanced use-cases only.
418+
496419Shortened Configuration Syntax
497- ------------------------------
420+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
498421
499422When you are only using one entity manager, all config options available
500423can be placed directly under ``doctrine.orm `` config level.
@@ -526,8 +449,85 @@ can be placed directly under ``doctrine.orm`` config level.
526449 This shortened version is commonly used in other documentation sections.
527450Keep in mind that you can't use both syntaxes at the same time.
528451
452+ Caching Drivers
453+ ~~~~~~~~~~~~~~~
454+
455+ For the caching drivers you can specify the values ``array ``, ``apc ``, ``apcu ``,
456+ ``memcache ``, ``memcached ``, ``redis ``, ``wincache ``, ``zenddata ``, ``xcache ``
457+ or ``service ``.
458+
459+ The following example shows an overview of the caching configurations:
460+
461+ .. code-block :: yaml
462+
463+ doctrine :
464+ orm :
465+ auto_mapping : true
466+ metadata_cache_driver : apc
467+ query_cache_driver :
468+ type : service
469+ id : my_doctrine_common_cache_service
470+ result_cache_driver :
471+ type : memcache
472+ host : localhost
473+ port : 11211
474+ instance_class : Memcache
475+
476+ Mapping Configuration
477+ ~~~~~~~~~~~~~~~~~~~~~
478+
479+ Explicit definition of all the mapped entities is the only necessary
480+ configuration for the ORM and there are several configuration options that
481+ you can control. The following configuration options exist for a mapping:
482+
483+ type
484+ ....
485+
486+ One of ``annotation ``, ``xml ``, ``yml ``, ``php `` or ``staticphp ``. This
487+ specifies which type of metadata type your mapping uses.
488+
489+ dir
490+ ...
491+
492+ Path to the mapping or entity files (depending on the driver). If this path
493+ is relative it is assumed to be relative to the bundle root. This only works
494+ if the name of your mapping is a bundle name. If you want to use this option
495+ to specify absolute paths you should prefix the path with the kernel parameters
496+ that exist in the DIC (for example ``%kernel.root_dir% ``).
497+
498+ prefix
499+ ......
500+
501+ A common namespace prefix that all entities of this mapping share. This
502+ prefix should never conflict with prefixes of other defined mappings otherwise
503+ some of your entities cannot be found by Doctrine. This option defaults
504+ to the bundle namespace + ``Entity ``, for example for an application bundle
505+ called AcmeHelloBundle prefix would be ``Acme\HelloBundle\Entity ``.
506+
507+ alias
508+ .....
509+
510+ Doctrine offers a way to alias entity namespaces to simpler, shorter names
511+ to be used in DQL queries or for Repository access. When using a bundle
512+ the alias defaults to the bundle name.
513+
514+ is_bundle
515+ .........
516+
517+ This option is a derived value from ``dir `` and by default is set to ``true ``
518+ if dir is relative proved by a ``file_exists() `` check that returns ``false ``.
519+ It is ``false `` if the existence check returns ``true ``. In this case an
520+ absolute path was specified and the metadata files are most likely in a
521+ directory outside of a bundle.
522+
523+ .. index ::
524+ single: Configuration; Doctrine DBAL
525+ single: Doctrine; DBAL configuration
526+
527+ .. _`reference-dbal-configuration` :
528+
529529Custom Mapping Entities in a Bundle
530- -----------------------------------
530+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
531531
532532Doctrine's ``auto_mapping `` feature loads annotation configuration from
533533the ``Entity/ `` directory of each bundle *and * looks for other formats (e.g.
@@ -585,7 +585,7 @@ directory instead:
585585 ));
586586
587587 Mapping Entities Outside of a Bundle
588- ------------------------------------
588+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
589589
590590You can also create new mappings, for example outside of the Symfony folder.
591591
@@ -647,7 +647,7 @@ namespace in the ``src/Entity`` directory and gives them an ``App`` alias
647647 ));
648648
649649 Detecting a Mapping Configuration Format
650- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
650+ ........................................
651651
652652If the ``type `` on the bundle configuration isn't set, the DoctrineBundle
653653will try to detect the correct mapping configuration format for the bundle.
@@ -666,7 +666,7 @@ root directory. If the folder exist, Doctrine will fall back to using an
666666annotation driver.
667667
668668Default Value of Dir
669- ~~~~~~~~~~~~~~~~~~~~
669+ ....................
670670
671671If ``dir `` is not specified, then its default value depends on which configuration
672672driver is being used. For drivers that rely on the PHP files (annotation,
0 commit comments