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

Fixed issue: createUpdateCommand does not accept just a table name when using MSSQL #4374

Merged
merged 3 commits into from
Sep 22, 2021

Conversation

c-schmitz
Copy link
Contributor

If a tablename as string is given the following error occurs:
Error: Call to a member function getColumn() on string

Normal CDBCommand (Mysql) does this just fine.

Q A
Is bugfix? ✔️
New feature?
Breaks BC?
Tests pass? ✔️

@marcovtwout
Copy link
Member

That function ensureTable() only assets if the tablename is valid, and throws an exception if it is not. That does not seem to fix the issue you are describing?

@c-schmitz
Copy link
Contributor Author

Look at ensureTable again. It modifies the $table variable, and replaces it with an object if it is a string.

@marcovtwout
Copy link
Member

@c-schmitz You are correct :) Are there any other functions for MsSql where this should also be applied?

If you would update the CHANGELOG as well in your PR I'd be happy to merge it.

@c-schmitz
Copy link
Contributor Author

We use MSSQL extensively for years in Yii1 and did not encounter any other issues.
I wil update the CHANGELOG.

@marcovtwout marcovtwout added this to the 1.1.25 milestone Sep 22, 2021
@marcovtwout marcovtwout self-assigned this Sep 22, 2021
@marcovtwout marcovtwout self-requested a review September 22, 2021 11:30
Copy link
Member

@marcovtwout marcovtwout left a comment

Choose a reason for hiding this comment

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

Have not tested but static code looks good.

CHANGELOG Outdated Show resolved Hide resolved
@marcovtwout
Copy link
Member

Thanks! Merging

@marcovtwout marcovtwout merged commit d2ad6cd into yiisoft:master Sep 22, 2021
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.

None yet

2 participants