1
0
mirror of synced 2025-01-18 06:21:40 +03:00

DDC-510 - Updated docs to reflect that Annotations Metadata Driver is not a default anymore, but required to specifiy

This commit is contained in:
Benjamin Eberlei 2010-04-12 21:58:21 +02:00
parent 2a1f5e121b
commit 8426a3da11

View File

@ -52,6 +52,8 @@ with the following minimalist configuration:
$config = new Configuration;
$cache = new \Doctrine\Common\Cache\ApcCache;
$config->setMetadataCacheImpl($cache);
$driverImpl = $config->newDefaultAnnotationDriver('/path/to/lib/MyProject/Entities');
$config->setMetadataDriverImpl($driverImpl);
$config->setQueryCacheImpl($cache);
$config->setProxyDir('/path/to/myproject/lib/MyProject/Proxies');
$config->setProxyNamespace('MyProject\Proxies');
@ -112,8 +114,14 @@ There are currently 4 available implementations:
Throughout the most part of this manual the AnnotationDriver is used in the examples. For information on the usage of the XmlDriver or YamlDriver please refer to the dedicated chapters `XML Mapping` and `YAML Mapping`.
The annotation driver is configured as the default metadata driver, using Annotations as Metadata source
does not require you to set this option explicitly.
The annotation driver can be configured with a factory method on the `Doctrine\ORM\Configuration`:
[php]
$driverImpl = $config->newDefaultAnnotationDriver('/path/to/lib/MyProject/Entities');
$config->setMetadataDriverImpl($driverImpl);
The path information to the entities is requied for the annotation driver, because otherwise
mass-operations on all entities through the console could not work correctly.
+++ Metadata Cache (***RECOMMENDED***)
@ -151,8 +159,8 @@ The recommended implementations are:
+++ SQL Logger (***Optional***)
[php]
$config->setSqlLogger($logger);
$config->getSqlLogger();
$config->setSQLLogger($logger);
$config->getSQLLogger();
Gets or sets the logger to use for logging all SQL statements executed by Doctrine. The logger class must implement the `Doctrine\DBAL\Logging\SqlLogger` interface. A simple default implementation that logs to the standard output using `echo` and `var_dump` can be found at `Doctrine\DBAL\Logging\EchoSqlLogger`.