java - Execute Select HQL with no locks? -


i have below hql query. want select without getting lock on tables department, employees other query concurrent retrieve records these table when below query running/executing

from department dept inner join fetch dept.employees  emp dept.id = :deptid 

i tried below thats still acquiring locks

from department dept nolock inner join fetch dept.employees  emp nolock dept.id = :deptid 

from department dept with(nolock) inner join fetch dept.employees  emp  dept.id = :deptid 

try this. note with(nolock) appended clause.


Comments

Popular posts from this blog

android - Get AccessToken using signpost OAuth without opening a browser (Two legged Oauth) -

org.mockito.exceptions.misusing.InvalidUseOfMatchersException: mockito -

google shop client API returns 400 bad request error while adding an item -