I have a list of objects that having becode as string(setter,getter),i want to set the ststus as "active" for all the becodes.below is my query.but its giving exceptions as "java.lang.ClassCastException: com.rogers.tpia.model.updatetpia cannot be cast to java.lang.String".pls help me u will get appriciated.
public void activateUser(List<updatetpia> act){
Session session = sessionFactory.getCurrentSession();
Query query=session.createQuery("update updatetpia up set status=:status where up.becode in (:acts)");
query.setString("status","Active");
query.setParameterList("acts",act );
int modifications=query.executeUpdate();
Hari_11
0
Newbie Poster
ihelpyou
0
Newbie Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.