Hi I think that org.hibernate.criterion.IdentifierProjection should look something like this:
Code:
public String toSqlString(Criteria criteria, int position, CriteriaQuery criteriaQuery)
throws HibernateException
{
StringBuffer buf = new StringBuffer();
String cols[] = criteriaQuery.getIdentifierColumns(criteria);
for(int i = 0; i < cols.length; i++){
if(i>0){
buf.append(", ");
}
buf.append(cols[i]).append(" as y").append(position + i).append('_');
}
return buf.toString();
}
i.e. put a space and a comma in for multi column ids. Currently the resulting sql does not have a space and therefore fails (unless it has been changed recently, I got confused when browsing the versions in fisheye).
Thanks!