-
Notifications
You must be signed in to change notification settings - Fork 121
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
Decimals, #106
Comments
@dirkjf thanks for the report. I’ll have a look at it asap. |
@dirkjf Could you please test again |
Tested it again, but I still have the same issue. Every time I update for all decimal values: {"old":"5.0","new":5}. And although it may show only "5" in the form, the actual data that is stored is "5.0". |
BTW, also when in my form I type "5.0", I get the same {"old":"5.0","new":5}. |
I ran some more tests. What helps (FOR ME) is to type cast the value to a float. So when I use on line 160 of AuditHelper.php: |
@dirkjf ok but what bothers me is that on |
I understand. Maybe this is why? |
I close this issue as this is more a Doctrine one. |
When I have any decimal type in my entity, upon updating the entity a new audit record is saved in which it seems the value was changed. This is even the case when I set the scale in my form to 1. For example, if I have a number saved as 5.0 in my database, when I edit the entity and do not touch this number, for this value "{"old":"5.0","new":"5"}" is saved.
I am using MariaDB version 10.3.15 on an Apache server 2.4.39 with PHP 7.3.6.
My entity field looks like this:
Thanks!
The text was updated successfully, but these errors were encountered: