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
Copy file name to clipboardExpand all lines: user_guide_src/source/changelogs/v4.8.0.rst
+3Lines changed: 3 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -249,6 +249,9 @@ Validation
249
249
Others
250
250
======
251
251
252
+
- **Float and Double Casting:** Added support for precision and rounding mode when casting to float or double in entities.
253
+
- Float and Double casting now throws ``CastException::forInvalidFloatRoundingMode()`` if an rounding mode other than up, down, even or odd is provided.
Copy file name to clipboardExpand all lines: user_guide_src/source/models/entities.rst
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -261,6 +261,7 @@ Add a question mark at the beginning of type to mark property as nullable, i.e.,
261
261
262
262
.. note:: **int-bool** can be used since v4.3.0.
263
263
.. note:: **enum** can be used since v4.7.0.
264
+
.. note:: Since v4.8.0, you can also pass parameters to **float** and **double** types to specify the number of decimal places and rounding mode, i.e., **float[2,even]**.
264
265
265
266
For example, if you had a User entity with an ``is_banned`` property, you can cast it as a boolean:
0 commit comments