-
-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Data not update when update value from integer to decimal #3247
Comments
@ohmcoe Can you give an small example of your code please? Also provide table schema. |
Table export from mysql
This models file.
this code to change value
the record in table test id 1 value is not change from 4 to 4.00 |
Your problem is here: https://github.com/phalcon/cphalcon/blob/2.0.0/phalcon/mvc/model.zep#L2317 The beauty of low typed language is to be able to compare apple with birds... Try this and you're be suprised ! $a = '4'; $b = '4.0'; var_dump($a, $b, $a == $b, $a === $b); But the bugfix is not so easy... What about putting an INT column with 4 as value replaced by '4'? No update is required... |
I try do review code of 2.0.0 to better detect changes. But maybe it is too strict now... |
Use the last 2.0.0. This bug is fixed. |
@andresgutierrez Fixed in #9996 |
I use phalcon 1.3.4 build from source.
database: mysql
And use models with useDynamicUpdate(true);
Example.
When update model value from 4 to 4.00 (type of field in database is longtext) the value in database is not change.
Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.
The text was updated successfully, but these errors were encountered: