private String createQueryString(boolean useCount,
Map<StationMonitorVolFieldsDB, String> criterias) {
// TODO Auto-generated method stub
StringBuilder sb = new StringBuilder();
int termCount = 0;
sb.append("select").append(useCount ? " count(t.id)" : " t ,case Data_Valid when '1' then '有效' when '2' then '无效' else '' end ")
.append(" from StationMonitorVolInfo as t");
return sb.toString();
下面报错信息,
Hibernate: select top 20 stationmon0_.ID as col_0_0_, case Data_Valid when '1' then '有效' when '2' then '无效' else '' end as col_1_0_, stationmon0_.ID as ID21_, stationmon0_.SERIALPORTEQUIID as SERIALPO2_21_, stationmon0_.dataType as dataType21_, stationmon0_.vol_data as vol4_21_, stationmon0_.data_valid as data5_21_, stationmon0_.updatetime as updatetime21_ from TSTATIONMONITORCIRCLE_VOL stationmon0_ where stationmon0_.SERIALPORTEQUIID='959' and (stationmon0_.dataType like '%V%')
ParamExceptionMappingInterceptor: java.lang.ClassCastException: [Ljava.lang.Object; cannot be cast to dwz.persistence.beans.StationMonitorVolInfo:[Ljava.lang.Object; cannot be cast to dwz.persistence.beans.StationMonitorVolInfo
java.lang.ClassCastException: [Ljava.lang.Object; cannot be cast to dwz.persistence.beans.StationMonitorVolInfo