Is it possible to convert the following HQL query into Criteria. There are a couple of case stmts in native SQL/hql code. Thank you !
String sql = " select " + " t.topic_key, t.topic_name,t.topic_id, t.topic_source_id, t.status, t.create_timestamp, t.update_timestamp, t.featured_content_id, " + " COUNT(CASE WHEN " + " uel.event_id= :eventId " + " and u.intent_id = '2' " + " THEN u.user_id END) AS numCouldHelp, " +
" COUNT(CASE WHEN " + " uel.event_id= :eventId " + " and u.expertise_id != '1' " + " THEN u.user_id END) AS numInterested " +
" FROM " + " topic t " + " join user_topic u on " + " t.topic_id = u.topic_id " + " join user_event_link uel on " + " u.user_id =uel.user_id " + " group by t.topic_id " ;
|