2011-06-14 31 views
3

當試圖建立在Spring-Roo的Postgres的項目中,我得到以下錯誤的實體:操作符不存在

ERROR org.hibernate.util.JDBCExceptionReporter - ERROR: operator does not exist: integer ~~ unknown 
Hint: No operator matches the given name and argument type(s). You might need to add explicit type casts. 
Position: 433 

可能是什麼解決辦法嗎?

+1

什麼是給你這個錯誤的確切命令? – abalogh 2011-06-14 11:23:03

+0

打開SQL日誌記錄,如果你可以並檢查出來 – Bohemian 2011-06-14 11:54:54

+0

是的,請張貼引發錯誤的SQL。 – Cesar 2011-06-14 12:01:45

回答

7

類型未知通常當你把一個字符串和Postgres結束了試圖決定,如果它是一個varchar,文字,文字排列等發生

演員需要你的字符串,如:

'2'::int 

或者不要在第一時間引用它(如果適用)。

+0

使sens。我想知道它是不是在我的春天roo項目類型枚舉的問題... – gpasse 2011-06-14 13:13:11

相關問題