You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If you try to check the uniquenes of a float that has decimal places, e.g. 6.3, the validation succeedes, even if there is already a reord with this value.
If you try the same with 6.0 it works.
It seems this problem persists within CakePHP itself because the record containing the value 6.3 also can't be found by using findByFieldX(6.3) (or findByFieldX('6.3') for that matter) where field_x would contain the float value.
If you try to find the record with the value 6.0 the same way, it works.
Tested with a MySQL datasource on Windows 7.
The text was updated successfully, but these errors were encountered:
Probably, I couldn't investigate it more thoroughly yet.
As this is not an issue of this behavior specifically I didn't felt the need to fix it immediatly.
I did/do, see these tests.
I had all the floats in my fixtures with decimal places and encountered the issue when I was writing the tests.
After I changed the fixtures and adjusted the tests to have 6.0 instead of 6.66 the validation worked as expected.
With decimal places the find a the end of Model::isUnique() always returns 0.
If you try to check the uniquenes of a float that has decimal places, e.g. 6.3, the validation succeedes, even if there is already a reord with this value.
If you try the same with 6.0 it works.
It seems this problem persists within CakePHP itself because the record containing the value 6.3 also can't be found by using findByFieldX(6.3) (or findByFieldX('6.3') for that matter) where field_x would contain the float value.
If you try to find the record with the value 6.0 the same way, it works.
Tested with a MySQL datasource on Windows 7.
The text was updated successfully, but these errors were encountered: