因此,我不斷收到標題錯誤。我使用創建查詢字符串,錯誤:運算符不存在:字符變化=數字
select p from Product p where p.productType.productTypeId in (:productTypeIds)
這裏是java的剪輯
List<Long>partTerminologyIds = getProducTypeds(partTerminologys);
..........................................................................
query.setParameter("partTerminologyIds", productTypeIds);
我不知道爲什麼我收到此錯誤,ANE是partTerminolgyId在我的數據庫是一個數值18.
任何想法???
你在'query.setParameter()'中有相反的參數。應該是'query.setParameter(「productTypeIds」,partTerminologyIds)'。 (您在'List':)之後還需要一個空格:)) –
2016-01-13 16:20:48