Doctrine 2 - ORM
  1. Doctrine 2 - ORM
  2. DDC-1413

Automatically create index for discriminator column

    Details

    • Type: Improvement Improvement
    • Status: Open
    • Priority: Minor Minor
    • Resolution: Unresolved
    • Affects Version/s: 2.1.2
    • Fix Version/s: None
    • Component/s: ORM, Tools
    • Labels:
      None

      Description

      It would be nice if the command line orm schema-tool would suggest an index on the discriminator column for single inheritance tables. Since that column would almost always be in the query, I can't think of a case when you wouldn't want it to be in an index

        Activity

        Hide
        Menno Holtkamp added a comment -

        This topic suggests it is a bad practice though:
        https://forum.hibernate.org/viewtopic.php?f=9&t=961578

        In case of a big STI hierarchy, this might become usefull, additional testing required. However, as soons as a STI hierarchy becomes big, Class Table Inheritance might be more appropriate...

        Show
        Menno Holtkamp added a comment - This topic suggests it is a bad practice though: https://forum.hibernate.org/viewtopic.php?f=9&t=961578 In case of a big STI hierarchy, this might become usefull, additional testing required. However, as soons as a STI hierarchy becomes big, Class Table Inheritance might be more appropriate...

          People

          • Assignee:
            Benjamin Eberlei
            Reporter:
            A.J. Brown
          • Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated: