hsql = "from sp as a where a.id in (?)";
query.setParameter(0, s,Hibernate.STRING);
其中s="1,2,3,4,5"
我想形成的sql为
from sp as a where a.id in (1,2,3,4,5)
但是query.setParameter(0, s,Hibernate.STRING);这个代码应该是形成了这样的sql
from sp as a where a.id in ('1,2,3,4,5');
请教下大家如果在in里面使用绑定变量的话一般都怎么做啊?