-->
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: alias not found
PostPosted: Thu May 31, 2007 1:48 am 
Newbie

Joined: Thu May 31, 2007 1:37 am
Posts: 1
I have the following code to make sure that the query does not acquire an exclusive lock on the database tables.

query=session.createQuery("select count(*) from prh a " +
" where a.prn = :form_nbr " +
" and UPPER(a.gsi) = :othr");
query.setLong("form_nbr",form_nbr);
query.setString("othr","OTHR");
query.setLockMode("a",LockMode.NONE);
The code compiles and builds fine, but when I run it, it throws the following exception:

exception: alias a not found

I am adding the LockMode.None to the query to avoid any kind of table locking as there is some other transaction that is expected to update the same row.

Any help in this regard with be greatly appreciated.


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.