How to solve mybatis batch insert to sqlserver losing precision
Story
使用mybatia寫入sqlserver db時的問題,當xml檔採用foreach的方式進行批量寫入時,BigDecimal的變數會因每筆寫入的精度不一致而採最低的精度寫入到db中
solve
cast
1 | <insert id="insertList" > |
using sqljdbc4 driver
筆者嘗試使用此方式,但未成功。
reference
All articles in this blog are licensed under CC BY-NC-SA 4.0 unless stating additionally.
Comment