Код: Выделить всё
public Student LoginStudent(Student student) {
List students = new ArrayList();
sessionFactory.getCurrentSession().getTransaction().begin();
String hql = "select stu_id,name from student where username = \"ap@gmail.com\"";
students = (List) sessionFactory.getCurrentSession().createSQLQuery(hql).uniqueResult();
if (students.size() > 0) {
return students.get(0);
} else {
return null;
}
}
java.lang.ClassCastException: java.math.BigInteger невозможно привести к Java .util.List
Я искал в Google, кто-то подсказывает:
Код: Выделить всё
return ((BigInteger)LoginStudent.get(0)).longValue();
Подробнее здесь: https://stackoverflow.com/questions/318 ... ng-project
Мобильная версия