0
我想加入一個表,其他兩個表,使用Hibernate和JPQL在Java中的單個列。Java Hibernate的DataException:不能轉換爲BIGINT
例如,我有table A
和id
列。我想加入table B
和table C
與列中的table A
。
但是,當我嘗試這樣做時,出現以下錯誤: org.hibernate.exception.DataException: The value supplied cannot be converted to BIGINT
。我看到一些答案,說可能有空值,但這些ID列是主要的ID列,並且不包含空值。
我的代碼如下:
@OneToOne(fetch = fetchType.LAZY)
@JoinColumn(name="id", insertable=false, updatable=false)
private TableB tableB
@OneToOne(fetch = fetchType.LAZY)
@JoinColumn(name="id", insertable=false, updatable=false)
private TableC tableC
當我刪除了兩個中的一個連接再次一切工作正常。
我在做什麼錯誤導致了這個問題?