|
1.往數(shù)據(jù)庫(kù)插入數(shù)據(jù)時(shí)報(bào):Data Truncation (即數(shù)據(jù)被截?cái)?
原因: a.數(shù)據(jù)庫(kù)中字段的長(zhǎng)度不夠長(zhǎng)造成的,可以把數(shù)據(jù)庫(kù)中的字段的長(zhǎng)度設(shè)置長(zhǎng)一些
b.A 表 定義的字段 content 是 255 B表定義的字段 content 50,如果當(dāng)A表的數(shù)據(jù)大于 50時(shí),那么你在插入B表時(shí)就會(huì)報(bào)java.sql.DataTruncation: Data 總之出現(xiàn)這樣的問題都是數(shù)據(jù)長(zhǎng)度的問題 2.Not all named parameters have been set(hibernate) 傳參問題,參數(shù)不夠或參數(shù)沒有一一對(duì)應(yīng)。
|
|
|