Spring hibernate template list as a parameter
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: i'm trying to execute this query : Code: this.getHibernateTemplate() find("select distinct ci.customer " + "from CustomerInvoice ci " + "where ci.id in (?) " , ids); with ids as a List, id is of type Long when executing i get exception Code: java.lang.ClassCastException: java.util.ArrayList cannot be cast to java.lang.Long at org.hibernate.type.LongType.set(LongType.java:42) at org.hibernate.type.NullableType.nullSafeSet(NullableType.java:136) at org.hibernate.type.NullableType.nullSafeSet(NullableType.java:116) at org.hibernate.param