-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 
Author Message
 Post subject: *** WARNING: Keyword 'from' is being intepreted as an ident
PostPosted: Thu May 12, 2005 9:51 am 
Senior
Senior

Joined: Sun Oct 26, 2003 5:05 am
Posts: 139
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" );


Top
 Profile  
 
 Post subject:
PostPosted: Thu May 12, 2005 10:23 am 
Senior
Senior

Joined: Sun Oct 26, 2003 5:05 am
Posts: 139
Well, I just gave in and renamed from to fromDate. Seems weird why the parser would care.


Top
 Profile  
 
 Post subject:
PostPosted: Thu May 12, 2005 11:15 am 
Beginner
Beginner

Joined: Tue Mar 15, 2005 2:36 am
Posts: 32
Location: Bonn, Germany
Seems related to http://forum.hibernate.org/viewtopic.php?t=939965 ... where I gave in and renamed when to when1.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.