Doctrine 2 - ORM
  1. Doctrine 2 - ORM
  2. DDC-2567

auto generated index name cannot be overriden with annotation

    Details

    • Type: Bug Bug
    • Status: Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: 2.3.4
    • Fix Version/s: None
    • Component/s: ORM
    • Security Level: All
    • Labels:
      None

      Description

      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

        Activity

        There are no comments yet on this issue.

          People

          • Assignee:
            Benjamin Eberlei
            Reporter:
            Nicolas Ricci
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated: