Pavel Naumov
02/06/2023, 10:02 AMMyTable.uShortCol.sum()
truncates result to ushort, obviously.
Any adwise?
I've found an issue on the GitGub https://github.com/JetBrains/Exposed/issues/1035 which seems relevant to me but there's no solutionMyTable.uShortCol.sum().castTo<Int>(IntegerColumnType())
And it's fine to me. But
MyTable.uShortCol.sum().castTo<UInt>(UIntegerColumnType())
didn't work because generated SQL query was incorrect
CAST(SUM(MyTable.uShortCol) AS INT UNSIGNED) b FROM
spand
02/06/2023, 3:03 PMPavel Naumov
02/06/2023, 4:41 PMUNSIGNED
inside the CAST
. It throws mysql error in my case (MariaDB 10.10)spand
02/06/2023, 6:58 PM