title: Work around for lack of sqlProjection support within criteria builder?
body: <p><a href="http://jira.grails.org/browse/GRAILS-2803" rel="nofollow">http://jira.grails.org/browse/GRAILS-2803</a> concerns lack of support for sqlProjection. It was closed as a duplicate and supposedly fixed in Grails v1.2. But the "duplicate" issue concerned sqlRestriction and I do not believe sqlProjection has been implemented as of Grails v1.3.2 at least.</p>
  
  <p>Are there any workarounds to use sqlProjection within a critera? For example,</p>
  
  <pre><code>def results = Report.createCriteria() list {
              projections {
                  sum('correctResponses')
                  sum('allResponses')
  
                  sqlProjection("(sum(correct_responses) / sum(all_responses))", ["grade"] as String[], [Hibernate.INTEGER] as Type[])
                  groupProperty('name')
              }
              and {
                  if (startDate)
                      ge("date", startDate)
  
                  if (endDate)
                      lt("date", endDate + 1) //add one day so search is inclusive of end date
  
                  'in' ("id", ids)
              }
              order(orderColumn ?: 'name', orderDirection ?: 'asc')
          }
  </code></pre>