Hibernate: insert into T_USER (LOGINNAME, PASSWORD, USERNAME, SEX, CONTACTNAME, EMAIL, POSTALCODE, DUTY, ADDRESS, SESSIONID, MOBILEPHONE, FAXNUMBER, PERSONID, DESCRIPTION, DEPTID, USERTYPEID, USERID) values
(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, 'com.newer.user.User', ?)我一直不明白为什么那些问号中间会有一个字符串,而且还是一个完整的类名。
求高手告诉我为什么会产生这种情况
详细异常:
org.hibernate.exception.GenericJDBCException: could not insert: [com.clochase.user.User]
at org.hibernate.exception.SQLStateConverter.handledNonSpecificException(SQLStateConverter.java:103)
at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:91)
at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:43)
……
(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, 'com.newer.user.User', ?)我一直不明白为什么那些问号中间会有一个字符串,而且还是一个完整的类名。
求高手告诉我为什么会产生这种情况
详细异常:
org.hibernate.exception.GenericJDBCException: could not insert: [com.clochase.user.User]
at org.hibernate.exception.SQLStateConverter.handledNonSpecificException(SQLStateConverter.java:103)
at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:91)
at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:43)
……
是 T_USER 对应的类么?
如果是的话 检查你这个类的属性
属性里是否又关联了其他类
怀疑是和其他类关联产生的错误
仔细检查下吧
我估计是XML配置文件中的类不是你的PO类吧对不起来。