DDC-2567: auto generated index name cannot be overriden with annotation #3294

Open
doctrinebot opened this Issue Jul 23, 2013 · 0 comments

2 participants

@doctrinebot

Jira issue originally created by user nicolasricci:

Hi,

I have an unexpected behaviour when generating SQL from an entity using annotation.

The default indexes name (generated by _generateIdentifierName) are automatically overwriting the name I have specified in my entity.

I have patched the following file https://github.com/doctrine/dbal/blob/master/lib/Doctrine/DBAL/Schema/Table.php

with:
// check for duplicates
foreach ($this->_indexes as $idxKey => $existingIndex) {
if ($indexCandidate->isFullfilledBy($existingIndex)) {
//return $this; // old implementation
unset($this->_indexes[$idxKey]);
}
}

but I don't think this is the correct way forward.

Let me know if you require more information

Thanks

@beberlei beberlei was assigned by doctrinebot Dec 6, 2015
@doctrinebot doctrinebot added the Bug label Dec 7, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment