-->
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.  [ 6 posts ] 
Author Message
 Post subject: SELECT Read only
PostPosted: Fri Dec 05, 2003 5:04 am 
Newbie

Joined: Mon Nov 17, 2003 11:44 am
Posts: 6
Hye,

We are using UDB DB2 v7 and we want use the FOR READ ONLY clause of DB2 in a SELECT query. This clause tells the database not to lock fetching rows.

Example : SELECT person from friends FOR READ ONLY.

How can we add this clause when we need it ?

Thank's


Top
 Profile  
 
 Post subject:
PostPosted: Fri Dec 05, 2003 5:13 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 12:50 pm
Posts: 5130
Location: Melbourne, Australia
use a native SQL query for this


Top
 Profile  
 
 Post subject:
PostPosted: Mon Dec 08, 2003 8:40 am 
Newbie

Joined: Mon Nov 17, 2003 11:44 am
Posts: 6
Yes,

But does this mean that i can't use a hibernate HQL query ?


Top
 Profile  
 
 Post subject:
PostPosted: Mon Dec 08, 2003 2:31 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
You can use HQL query - but not if you want the "FOR READ ONLY" added to the SQL.

For that you should use something like createSQLQuery that allows you to use propritary sql stuff like this.

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject:
PostPosted: Mon Dec 08, 2003 7:34 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 12:50 pm
Posts: 5130
Location: Melbourne, Australia
You *could* hack the Hibernate source to support a new LockMode. It wouldn't be difficult.

(Do we need extensible LockModes, guys?)


Top
 Profile  
 
 Post subject:
PostPosted: Tue Dec 09, 2003 3:40 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
Depends - are there other usecases and databases than just DB2 that has a similar lockmode ?

_________________
Max
Don't forget to rate


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 6 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.