How to alter the method so that it returns the type of Competition?
public Competition updateCompetition(Long id, Integer point, Integer place){ Query q = sessionFactory.getCurrentSession().createQuery("update Competition set point= :point, place= :place where id = :id"); q.setParameter("id", id); q.setParameter("point", point); q.setParameter("place", place); return (Competition) q.executeUpdate();//так не приводит типы }