DDC-86: Allow to generate index for an entity property #107

Closed
opened 2026-01-22 12:27:16 +01:00 by admin · 4 comments
Owner

Originally created by @doctrinebot on GitHub (Oct 31, 2009).

Originally assigned to: @beberlei on GitHub.

Jira issue originally created by user @beberlei:

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.

Originally created by @doctrinebot on GitHub (Oct 31, 2009). Originally assigned to: @beberlei on GitHub. Jira issue originally created by user @beberlei: 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.
admin added the New Feature label 2026-01-22 12:27:16 +01:00
admin closed this issue 2026-01-22 12:27:17 +01:00
Author
Owner

@doctrinebot commented on GitHub (Oct 31, 2009):

Comment created by romanb:

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.

@doctrinebot commented on GitHub (Oct 31, 2009): Comment created by romanb: 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.
Author
Owner

@doctrinebot commented on GitHub (Oct 31, 2009):

Comment created by @beberlei:

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

However i think indexes is not supported in SchemaTool

@doctrinebot commented on GitHub (Oct 31, 2009): Comment created by @beberlei: indexes={} is enough I guess, haven't found it :-) However i think indexes is not supported in SchemaTool
Author
Owner

@doctrinebot commented on GitHub (Nov 2, 2009):

Issue was closed with resolution "Invalid"

@doctrinebot commented on GitHub (Nov 2, 2009): Issue was closed with resolution "Invalid"
Author
Owner

@doctrinebot commented on GitHub (Nov 19, 2012):

Comment created by ascarius:

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

@doctrinebot commented on GitHub (Nov 19, 2012): Comment created by ascarius: By this way, mappedSuperclasses could finally add indexes...
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: doctrine/archived-orm#107