-
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
+ Index name for OneToOne relation #1498
base: old-prototype-3.x
Are you sure you want to change the base?
Conversation
Hello, thank you for creating this pull request. I have automatically opened an issue http://www.doctrine-project.org/jira/browse/DDC-3883 We use Jira to track the state of pull requests and the versions they got |
@@ -340,6 +340,7 @@ public function loadMetadataForClass($className, ClassMetadata $metadata) | |||
$mapping['cascade'] = $oneToOneAnnot->cascade; | |||
$mapping['orphanRemoval'] = $oneToOneAnnot->orphanRemoval; | |||
$mapping['fetch'] = $this->getFetchMode($className, $oneToOneAnnot->fetch); | |||
$mapping['indexName'] = $oneToOneAnnot->indexName; |
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.
@deeky666 poke
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.
I think the less we mess with implicit indexes the better - a better solution would be to define an @Index on the table that satisfies the FK index. Not sure if the TableDiff will prevent creation of the FK index if it's exactly satisfied by an explicit index though.
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.
@zeroedin-bill I disagree here. It's a lot easier and less error prone to have an attribute on the association simply for the index name. Also it relates a lot better to have it at this place rather than loosely in the table section. You can still do your own @Index
definitions to overwrite implicit indexes if you want to. But simply being able to change the index name without having to clutter the definition with another @Index
makes totally sense IMO.
No description provided.