DDC-1412: DriverChain defaultDriver #2036

Closed
doctrinebot opened this Issue Oct 11, 2011 · 3 comments

1 participant

@doctrinebot

Jira issue originally created by user armetiz:

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.

@doctrinebot

Issue was closed with resolution "Fixed"

@doctrinebot

Comment created by @FabioBatSilva:

Fixed in : 16b22f0

@doctrinebot doctrinebot added this to the 2.3 milestone Dec 6, 2015
@doctrinebot doctrinebot closed this Dec 6, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment