Details
-
Type:
New Feature
-
Status:
Resolved
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: Git Master
-
Fix Version/s: 2.3
-
Component/s: Mapping Drivers
-
Security Level: All
-
Labels:None
Description
The \Doctrine\ORM\Mapping\Driver\DriverChain is a good thing, but a default driver should be a another great thing.
Actually, to use DoctrineExtension Translatable I have to use the DriveChain to add a specific driver for Gedmo\Translatable.
The problem is, that I have to define the same EntityDriver on all my entity in this driver.
$driverChain->addDriver ($entityDriver, 'EntityA');
...
$driverChain->addDriver ($entityDriver, 'EntityB');
$driverChain->addDriver ($translatableDriver, 'Gedmo\Translatable');
It would be really friendly to do
$driverChain->setDefaultDriver ($entityDriver);
$driverChain->addDriver ($translatableDriver, 'Gedmo\Translatable');
I have attach a fix (SVN) for the DriveChain class.
Fixed in : https://github.com/doctrine/doctrine2/commit/16b22f0f3138ad607ccecd9397d0ec267d6cc478