Doctrine 2 - ORM
  1. Doctrine 2 - ORM
  2. DDC-86

Allow to generate index for an entity property

    Details

    • Type: New Feature New Feature
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Invalid
    • Affects Version/s: 2.0-ALPHA2
    • Fix Version/s: None
    • Component/s: ORM
    • Security Level: All
    • Labels:
      None

      Description

      There is a unique option, but no index option for fields. This way you can't control the generation of indexes for fields which are used in queries often via the schema file and schema tool.

        Activity

        Hide
        Roman S. Borschel added a comment - - edited

        There is @Table(...., indexes=

        {...}

        )

        I know you probably mean the "shortcut" in the @Column annotation. You think there should be shortcut for indexing, too? I think its far less common to index a normal field (non-pk, non-fk) than to make it unique. I will take a look whether there is an index option on the Column annotation in the JPA spec, just to see.

        Show
        Roman S. Borschel added a comment - - edited There is @Table(...., indexes= {...} ) I know you probably mean the "shortcut" in the @Column annotation. You think there should be shortcut for indexing, too? I think its far less common to index a normal field (non-pk, non-fk) than to make it unique. I will take a look whether there is an index option on the Column annotation in the JPA spec, just to see.
        Hide
        Benjamin Eberlei added a comment - - edited

        indexes={} is enough I guess, haven't found it

        However i think indexes is not supported in SchemaTool

        Show
        Benjamin Eberlei added a comment - - edited indexes={} is enough I guess, haven't found it However i think indexes is not supported in SchemaTool
        Hide
        Lionel Gaillard added a comment -

        By this way, mappedSuperclasses could finally add indexes...

        Show
        Lionel Gaillard added a comment - By this way, mappedSuperclasses could finally add indexes...

          People

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

            Dates

            • Created:
              Updated:
              Resolved: