我有我的Hibernate類下面的代碼:休眠列表警告;
public List<Something> getSomethingList(Integer[] ls){
String sql = "FROM SOMETHING WHERE IDSOMETHING IN (:ls)";
return this.getSession().createQuery(sql).setParameterList("ls", ls).list();
}
我對回行的警告。警告如下:
Type safety: The expression of type List needs unchecked conversion to conform to List<Something>
我知道這不是一個大問題,但我該如何解決此警告?
感謝
可能的重複http://stackoverflow.com/questions/115692/how-to-avoid-type-safety-warnings-with-hibernate-hql-results – Bitmap 2012-04-27 20:59:24