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.
Noticed that same bug applies also to JPQL queries, so it is not Criteria API specific. For example "select cast(t.<attribute> as double) from Table t". |
|