Wednesday, May 16, 2007

Hibernate 3.2.4 處理 Derby 的 identity column 有問題

把 id 的 generator 設定成 class="identity",新增資料時,正常是像這樣

Hibernate: insert into family (family_id, last_name, first_name, prefix, grade, comment, balance) values (default, ?, ?, ?, ?, ?, ?)

Hibernate: values identity_val_local()

可是 3.2.4 卻會這樣

Hibernate: insert into family (last_name, first_name, prefix, grade, comment, balance, family_id) values (?, ?, ?, ?, ?, ?, ?)

2007/5/16 上午 10:05:23 org.hibernate.util.JDBCExceptionReporter logExceptions

警告: SQL Error: 30000, SQLState: 07000

2007/5/16 上午 10:05:23 org.hibernate.util.JDBCExceptionReporter logExceptions

嚴重的: At least one parameter to the current statement is uninitialized.

不知道是不是只有用 Derby 會這樣,3.2.3 以前版本都正常的,害我浪費不少時間....


  • 留言者: JiaYun
  • Email:
  • 網址:
  • 日期: 2007-05-30 00:27:47
3.2.4.sp1 正常了

http://opensource.atlassian.com/projects/hibernate/browse/HHH-2605

No comments:

Post a Comment