Hi All,
'Ticket Id' property in hibernate class is defined as 'Long' data type. In data base it is having row for TicketId# 69 and I'm using below criteria for getting the data for this record
Criteria crit = HibernateUtil.getSessionFactory() .getCurrentSession().createCriteria(HelpManager.class);
crit.add(Expression.idEq(TicketNo));
result = crit.list();
In log, it is created below query:
In HelpManager submitCriteria TicketNo:69
Hibernate: select this_.TICKET_ID as TICKET1_3_0_, this_.PROJECT_NAME as PROJECT2_3_0_, this_.MODIFIED_BY as MODIFIED10_3_0_, this_.MODIFIED_DT as MODIFIED11_3_0_ from USER_COMMENTS this_ where this_.TICKET_ID = ?
It is not throwing any error but it is not retrieving any records.
Thanks in advance.
Regards,
Sharath.
|