Hello all,
Can anyone help me understand java.lang.classcastException. I am trying to delete no of records using 'in' clause in hibernate.and when i pass an array to query it shows classcastexception.
Long idn[]={1,3}; query = session.createQuery("delete from Rolecomponentdisplaysettings as rcds where rcds.id.displaysettingid IN(:value) And rcds.id.roleid=:value1");
query.setParameter("value1", roleId); //roleId is of String type query.setParameter("value",idn ); //idn is og long array query.executeUpdate();
|