-
Notifications
You must be signed in to change notification settings - Fork 2.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Join column index names #1138
Join column index names #1138
Conversation
Hello, thank you for creating this pull request. I have automatically opened an issue http://www.doctrine-project.org/jira/browse/DDC-3310 We use Jira to track the state of pull requests and the versions they got |
*/ | ||
protected $maker; | ||
|
||
public function getId() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please remove any code not related with the test
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you mean the getter/setters?
This may have been fixed by doctrine/dbal#769, please re-check. |
Just checked one of my projects and my alters list is significantly smaller after updating dbal. Cursory glance I don't see any previously generated indexes being dropped and created in the alters either. Thanks! |
Thanks for checking, @stanlemon! |
@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 fromSchemaTool
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!