This just throws a org.hibernate.exception.SQLGrammarException, if I remove the withProjections it works fine. What is the correct way to do this?
var criteria = commentService.newCriteria();
criteria.eq(“relatedContent.contentID”, javaCast(“int”, comment.getrelatedContent().getContentId() ));
criteria.ne( “authorEmail”, comment.getAuthorEmail() );
criteria.withProjections(distinct = “authorEmail”);
results = criteria.list();