Allow possibility to create unique indexes from the ORM mapping itself #5256

Closed
opened 2026-01-22 15:02:44 +01:00 by admin · 1 comment
Owner

Originally created by @guilhermeblanco on GitHub (Sep 14, 2016).

Originally assigned to: @guilhermeblanco on GitHub.

Currently the only way we have to create unique indexes are through unique constraints, which is already misleading.
As part of ORM 3 efforts, we should allow a flag unique to be defined and create a unique index. This is inline with JPA 2.1 defined in http://docs.oracle.com/javaee/7/api/javax/persistence/Index.html

Originally created by @guilhermeblanco on GitHub (Sep 14, 2016). Originally assigned to: @guilhermeblanco on GitHub. Currently the only way we have to create unique indexes are through unique constraints, which is already misleading. As part of ORM 3 efforts, we should allow a flag `unique` to be defined and create a unique index. This is inline with JPA 2.1 defined in http://docs.oracle.com/javaee/7/api/javax/persistence/Index.html
admin added the ImprovementNew Feature labels 2026-01-22 15:02:44 +01:00
admin closed this issue 2026-01-22 15:02:45 +01:00
Author
Owner

@guilhermeblanco commented on GitHub (Sep 15, 2016):

Done as of 3639aa9096

@guilhermeblanco commented on GitHub (Sep 15, 2016): Done as of https://github.com/doctrine/doctrine2/commit/3639aa9096aba39ab0f3c0a9a350002f2831a94b
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: doctrine/archived-orm#5256