[DDC-86] Allow to generate index for an entity property Created: 31/Oct/09  Updated: 19/Nov/12  Resolved: 02/Nov/09

Status: Resolved
Project: Doctrine 2 - ORM
Component/s: ORM
Affects Version/s: 2.0-ALPHA2
Fix Version/s: None
Security Level: All

Type: New Feature Priority: Major
Reporter: Benjamin Eberlei Assignee: Benjamin Eberlei
Resolution: Invalid Votes: 0
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.



 Comments   
Comment by Roman S. Borschel [ 31/Oct/09 ]

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.

Comment by Benjamin Eberlei [ 31/Oct/09 ]

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

However i think indexes is not supported in SchemaTool

Comment by Lionel Gaillard [ 19/Nov/12 ]

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

Generated at Sat Nov 29 07:32:49 UTC 2014 using JIRA 6.2.3#6260-sha1:63ef1d6dac3f4f4d7db4c1effd405ba38ccdc558.