hibernate插入不對
?為什么我用hibernate去save一條數(shù)據(jù)時(shí),總是報(bào)ids?for?this?class?must?be?manually?assigned?before?calling?save():?cn.czq.entity.Product;?nested?exception?is?org.hibernate.id.IdentifierGenerationException:?ids?for?this?class?must?be?manually?assigned?before?calling?save():?cn.czq.entity.Product??但是只有id不自動增加就沒問題
2016-11-27
這要看你用的什么數(shù)據(jù)庫,如果是oracle你把generator 該為assigned, 如果是mysql你要設(shè)置為native,你可以試下