Affects Version/s: None
Fix Version/s: None
Decimal type in mysql converts as a string in php. This is great as Decimal has a much higher precision than a float or double and that precision would be lost if converted to a float in PHP. Fine! But when doing calculations (as my numbers do not require an enormous precision gmp_ functions are not necessary) php converts these strings into floats. Then, when computing the changeset, as the value is compared with === is marked as a change even though there is none ("5.00" string vs 5.00 float) and an UPDATE for that row is made. Would it be possible to check only for simple equality "==" instead of type equality "===" when dealing with scalar types?
Another example of this would be the boolean type, that it is stored as an integer 1 in mysql but converted to a boolean true in php. If during the execution of my code that boolean gets converted to an integer 1, that will trigger an UPDATE also because 1 !== true.
Should this be my responsability or doctrine should be a little more flexible regarding comparisons? Thanks!!
|Field||Original Value||New Value|
|Workflow||jira [ 13743 ]||jira-feedback [ 14072 ]|
|Workflow||jira-feedback [ 14072 ]||jira-feedback2 [ 15936 ]|
|Workflow||jira-feedback2 [ 15936 ]||jira-feedback3 [ 18185 ]|