I am trying to add oracle optimizer to run query faster from application code using criteria api. There is addQueryHint() method in Criteria but it doesnt seem to work using the latest hibernate API.
After searching thru the web I found some hacks/workarounds but something is not working for me .. I create a select statement using the ArrayList of columns, I need to add /*+ PARALLEL(4) */ to the criteria using projections as. Any help is appreciated.
ProjectionList projectionList = Projections.projectionList();
while (viewIt.hasNext()) {
viewName = viewIt.next();
projectionList.add(Projections.property(viewName));
}
criteria.setProjection(projectionList);