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

Tinyint issue in generating model using GII #16635

Closed
sri-rama-krishna opened this issue Aug 13, 2018 · 5 comments
Closed

Tinyint issue in generating model using GII #16635

sri-rama-krishna opened this issue Aug 13, 2018 · 5 comments

Comments

@sri-rama-krishna
Copy link

What steps will reproduce the problem?

Create any table with a field of type "tinyint" and try to generate a model through GII

What is the expected result?

My expected result is that in the rules function i need to get that tinyint as Integer.

What do you get instead?

I get that tinyint as string.

Additional info

I debug that in Generator.php (vendor/yiisoft/yii2-gii/generators/model/Generator.php) generaterules function in switch case "tinyint" is missing.

Q A
Yii version 2.0.15
PHP version 7+
Operating system windows
@carono
Copy link
Contributor

carono commented Aug 14, 2018

Check the version yiisoft/yii2-gii yiisoft/yii2-gii#335 maybe this is the problem?

@samdark samdark closed this as completed Aug 19, 2018
@sri-rama-krishna
Copy link
Author

yiisoft/yii2-gii#335 is not the solution anyway it is closed.

@carono
Copy link
Contributor

carono commented Aug 20, 2018

update yiisoft/yii2-gii to 2.0.7, and I think is will be solution

@sri-rama-krishna
Copy link
Author

my version is latest(2.0.15)

capture

the highlighted part is missing, i added that line in my source code

@carono
Copy link
Contributor

carono commented Aug 20, 2018

2.0.15 is yiisoft/yii2, and I'm talking about the generator itself, yiisoft/yii2-gii, just exec composer update yiisoft/yii2-gii

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants