mybatis查詢數據下標越界

https://github.com/mybatis/mybatis-3/issues/1567

### The error occurred while handling results
### SQL: SELECT sku_code,sku_key,sku_value,style_no,sku_status,lsin,is_old,last_modified,date_added,source,stock_quantity,is_custom FROM products_sku WHERE sku_code=?
### Cause: java.lang.IndexOutOfBoundsException: Index: 12, Size: 12

問題很奇葩,因爲只是個簡單的select* ,沒有使用到數組,卻出現了下標越界
解決:
實體不能存在數據庫沒有的字段
https://github.com/mybatis/mybatis-3/issues/1567

那麼如何允許實體存在數據庫不存在的字段呢??
@TableField(exist=false)
但是我試了依然報錯
後面發現是@Builder 註解在搞鬼
https://www.projectlombok.org/features/Builder

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章