Closed llzbz closed 11 months ago
We are having the same issue. I noticed some logic stopped working in our app because of changed types returned from medoo. I guess there will be many places now where this got broken. We upgraded from 2.1.4 to 2.1.9 and the following code
$this->select('user_id', ['group_id' => $group_id, 'group_type' => $group_type]);
started returning array of strings instead of integers. user_id is defined as int in our MySQL database.
If it was intended, please don't do such changes without using new major version. Could you please look into it as soon as possible? I will downgrade the version back in the meantime.
@hzbbcc @scr4bble I have fixed this issue on 802251e. Would you try that and see if the problem is resolved?
Yes, it seems to work in 802251e (integers were returned from int MySQL column) - at least the one case that I mentioned above.
I had some difficulties trying a specific commit though so I hope I tested it correctly.
(had to add the repo into "repositories" in composer.json and use composer require catfan/medoo:dev-master#802251e
)
@scr4bble OK. The v2.1.10 version with this fix is released. https://github.com/catfan/Medoo/releases/tag/v2.1.10
@scr4bble OK. The v2.1.10 version with this fix is released. https://github.com/catfan/Medoo/releases/tag/v2.1.10
Thank you for your work!
Information
Describe the Problem For fix the issue #1085 ,make the field not defined will be converted to String type,like Int...which real need Int value and not String value, please make a default logic that will not be converted.
Detail Code The detail code you are using causes the problem.
Expected output A clear and concise description of what output you expected.