DDC-3310: [GH-1138] Join column index names #4091

Closed
opened 2026-01-22 14:35:04 +01:00 by admin · 4 comments
Owner

Originally created by @doctrinebot on GitHub (Sep 15, 2014).

Originally assigned to: @Ocramius on GitHub.

Jira issue originally created by user @doctrinebot:

This issue is created automatically through a Github pull request on behalf of stanlemon:

Url: https://github.com/doctrine/doctrine2/pull/1138

Message:

@Ocramius recommended I open this up to discuss the issue I am seeing.

I am trying to explicitly name the index on a column which is used in a join. I've attempted to add two functional tests in this PR to demonstrate what I am seeing. Please forgive me if these tests are not correctly, this is the first time I've attempted to submit a PR like this.

There are two situations I am encountering...

First, I explicitly name the index in the @Table annotation on the column used in the join - but the SQL generated from SchemaTool appears to be a random hash.

Second, when I have an existing database table with an existing index and it's named properly (in this example, idx_maker_id) and then I run SchemaTool->updateSchema() it drops the index with the proper name and creates a new randomly hashed name.

Is there a different way of accomplishing what I am trying to do here, or is this a bug?

Thanks for your help and assistance!

Originally created by @doctrinebot on GitHub (Sep 15, 2014). Originally assigned to: @Ocramius on GitHub. Jira issue originally created by user @doctrinebot: This issue is created automatically through a Github pull request on behalf of stanlemon: Url: https://github.com/doctrine/doctrine2/pull/1138 Message: @Ocramius recommended I open this up to discuss the issue I am seeing. I am trying to explicitly name the index on a column which is used in a join. I've attempted to add two functional tests in this PR to demonstrate what I am seeing. Please forgive me if these tests are not correctly, this is the first time I've attempted to submit a PR like this. There are two situations I am encountering... First, I explicitly name the index in the `@Table` annotation on the column used in the join - but the SQL generated from `SchemaTool` appears to be a random hash. Second, when I have an existing database table with an existing index and it's named properly (in this example, idx_maker_id) and then I run `SchemaTool->updateSchema()` it drops the index with the proper name and creates a new randomly hashed name. Is there a different way of accomplishing what I am trying to do here, or is this a bug? Thanks for your help and assistance!
admin added the Bug label 2026-01-22 14:35:04 +01:00
admin closed this issue 2026-01-22 14:35:04 +01:00
Author
Owner

@doctrinebot commented on GitHub (Sep 15, 2014):

@doctrinebot commented on GitHub (Sep 15, 2014): - duplicates [DBAL-1108: [GH-769] Allow overriding implicit indexes](http://www.doctrine-project.org/jira/browse/DBAL-1108)
Author
Owner

@doctrinebot commented on GitHub (Jan 14, 2015):

Comment created by @doctrinebot:

A related Github Pull-Request [GH-1138] was closed:
https://github.com/doctrine/doctrine2/pull/1138

@doctrinebot commented on GitHub (Jan 14, 2015): Comment created by @doctrinebot: A related Github Pull-Request [GH-1138] was closed: https://github.com/doctrine/doctrine2/pull/1138
Author
Owner

@doctrinebot commented on GitHub (Jan 14, 2015):

Comment created by @ocramius:

Was already handled in DBAL-1108

@doctrinebot commented on GitHub (Jan 14, 2015): Comment created by @ocramius: Was already handled in [DBAL-1108](http://www.doctrine-project.org/jira/browse/DBAL-1108)
Author
Owner

@doctrinebot commented on GitHub (Jan 14, 2015):

Issue was closed with resolution "Duplicate"

@doctrinebot commented on GitHub (Jan 14, 2015): Issue was closed with resolution "Duplicate"
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: doctrine/archived-orm#4091