Skip to content
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

Schema manager should also know how to handle shard key on reference #1748

Merged
merged 1 commit into from
Mar 9, 2018

Conversation

alcaeus
Copy link
Member

@alcaeus alcaeus commented Mar 9, 2018

This backports #1693 to the 1.2 branch. My initial hunch regarding field name translation was correct - this was an additional issue affecting all shard keys that have a different database name. This is also fixed in this PR.

// cc @notrix

@alcaeus alcaeus added the Bug label Mar 9, 2018
@alcaeus alcaeus added this to the 1.2.2 milestone Mar 9, 2018
@alcaeus alcaeus self-assigned this Mar 9, 2018
@alcaeus alcaeus requested a review from malarzm March 9, 2018 06:14
->expects($this->at(0))
->method('command')
->with(array('enableSharding' => $dbName))
->willReturn(array('ok' => 1));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this mocked instead of sending actual command and inspecting schema later?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Most tests in schema manager build on mocks. These are scheduled for a refactoring in master branch since the mocks are no longer valid.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All right 👍

@malarzm malarzm merged commit b187b08 into doctrine:1.2.x Mar 9, 2018
@alcaeus alcaeus deleted the backport-fix-sharding-by-reference branch March 9, 2018 15:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants