| When creating Criteria API expression using Expression.as(Double.class) or Expression.as(Float.class) wrong SQL is produced. First one produces "cast(<attribute> as double precision)" and the second one "cast(<attribute> as float)". Either of these syntax are not working with MySQL database. |