String jpql="select count(t) from student t";
Query
query=entityManager.createQuery(jpql); Object sum= query.getSingleResult();
pg.setSum((int)sum);
pg.setSum((int)sum);他说我这句ava.lang.ClassCastException: java.lang.Long cannot be cast to java.lang.Integer