嗨,我真的很喜欢java编程。
但是我试图使用Hibernate执行select选项但是我得到了一个异常
这是我的代码。
public List<Ticket> getTableData(Ticket parameters, String username, int minCount, int start) throws HibernateException, SQLException, Exception {
Session session = sessionFactory.getCurrentSession();
Query query;
query = session.createQuery("FROM Ticket T "
+ "INNER JOIN Systemuser SU ON SU.employee.employeeid = T.employee.employeeid "
+ "INNER JOIN Status S ON S.statusid = T.status.statusid "
+ "WHERE SU.username = :username AND S.isfinalstatus <> :isfinalstatus");
query.setParameter("username", username);
query.setParameter("isfinalstatus", MasterDataVarList.AFFINITI_CODE_ISFINALSTATUS);
query.setMaxResults(minCount);
query.setFirstResult(start);
return query.list();
}