ibatis中以下内容有什么区别:
当我使用第二种格式时,我得到以下异常 java.sql.SQLException: Missing IN or OUT parameter at index:: 1
1)
UPDATE TRAN_ITEM
SET BOOK_HNDL_MARK_T=#marksAndNumbers#,
MDSE_CRGO_DESC_T=#cargoDesc#,
UPDT_PGM_I = 'OTM-RTS'
WHERE
TRAN_ITEM_I=#instanceId#
2)
UPDATE TRAN_ITEM SET
BOOK_HNDL_MARK_T='$marksAndNumbers$',
MDSE_CRGO_DESC_T='$cargoDesc$',
UPDT_PGM_I = 'OTM-RTS'
WHERE TRAN_ITEM_I='$instanceId$'
我的DAO如下:
paramMap.put("marksAndNumbers", poItemDetailVO
.getMarksAndNumbers());
paramMap.put("cargoDesc", poItemDetailVO.getCargoDescription());
paramMap.put("instanceId", Integer.valueOf(Long .toString(poItemDetailVO.getInstanceID())));