Move from Criteria Queries to Hql Queries, joining using hibernate instead of with sql for temporary id joining in evaluations.