[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


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.

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 Mon Nov 30 08:27:19 EST 2015 using JIRA 6.4.10#64025-sha1:5b8b74079161cd76a20ab66dda52747ee6701bd6.