I often get the following warning with Hibernate 3.02:
*** WARNING: Keyword 'from' is being intepreted as an identifier due to: expecting IDENT, found 'from'
The queries still work and all the test cases pass regardless. Is there any way I can tweak the hql to get rid of it? And example where this happens is as follows:
Code:
buffer.append( "select shipment " );
buffer.append( "from Shipment shipment " );
buffer.append( " inner join shipment.cargoControlNumber.carrierCode.carrier.persons person " );
buffer.append( "where person.id = :personId " );
buffer.append( "and shipment.driver.number like :driverNumber ",
driverNumber );
buffer.append( "and shipment.releaseOffice.id = :releaseOfficeId ",
releaseOfficeId );
buffer.append( "and shipment.subLocation.id = :subLocationId ",
subLocationId );
buffer.append( "and shipment.serviceOption.id = :serviceOptionId ",
serviceOptionId );
buffer.append( "and shipment.currentStatus.releaseCode.id = :releaseCodeId ",
releaseCodeId );
buffer.append( "and shipment.currentStatus.date >= :from ", from );
buffer.append( "and shipment.currentStatus.date <= :to ", to );
buffer.append( "and shipment.containerNumber like :containerNumber ", containerNumber );
buffer.append( "order by shipment.currentStatus.date desc" );