Hi all, i'm developing the following query:
Code:
criteria.add(Expression.ge("idradiologo", Long.valueOf(idradiologo)));
criteria.setProjection( Projections.projectionList()
.add( Projections.rowCount(), "cantidad" )
.add( Projections.groupProperty("fechaexamen"), "fechaexamen" )
.add( Projections.groupProperty("idradiologo"), "idradiologo" )
);
criteria.add(Expression.between("fechaasignacion",
this.fechainicio,this.fechatermino));
criteria.addOrder(Order.asc("fechaexamen"));
criteria.setResultTransformer(Transformers.aliasToBean
(ExamenPorRadiologo.class));
criteria.add(Expression.ge("idradiologo", Long.valueOf(idradiologo))) with this line of code tries to select all idradiologo different from
Long.valueOf(idradiologo), but display the following error:
Code:
10:49:04,123 WARN [JDBCExceptionReporter] SQL Error: 1054, SQLState: 42S22
10:49:04,123 ERROR [JDBCExceptionReporter] Unknown column 'y2_' in 'where
clause'
...
Caused by: com.mysql.jdbc.exceptions.MySQLSyntaxErrorException:
Unknown column 'y2_' in 'where clause'
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:936)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:2985)
at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1631)
at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:1723)
How can I fix it?
Thanks