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.  [ 1 post ] 
Author Message
 Post subject: Escaping keywords from HQL queries
PostPosted: Wed Oct 15, 2008 11:24 am 
Newbie

Joined: Thu Sep 18, 2008 7:39 am
Posts: 6
Hi,

I' ve entity following entity:
Code:
<hibernate-mapping>
  <class entity-name="Order"   name="Order"table="&quot;ORDER&quot;">
  ................
</class>
</hibernate-mapping>


When I'm tryin to execute HQL Query like this :
Code:
UPDATE Order t  SET t.description=?   
WHERE t IN (FROM Order t WHERE t.id=?  )


exception occures java.lang.IllegalArgumentException: node to traverse cannot be null!

If I change entity name on string which is not hibernate key-word, the update execute correctly. But the problem is, that I can't change entity-name.

Is there any way to escape somehow hibernate keywords, to force parser to no treating "Order" like a one of keyword ??

_________________
Jakub Miszkurka


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

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.