| 
							
					| Beginner |  
					|  |  Joined: Wed Sep 15, 2004 3:14 am
 Posts: 35
 | 
				
					| Hi
 Is it possible to lock a table with Hibernate?
 
 The scenario is that when I delete a record in the table, I need to update some fields of all the records in the same table. During the deleting/updating process, I don't want anyone to insert/update/delete data from this table but allow users to view data in the original state.
 
 How can I implement this in Hibernate. I believe LockMode applies to object/record only and not table.
 
 I am using PostreSQL and currently I use:
 
 LOCK TABLE tbl_name IN ACCESS EXCLUSIVE MODE
 
 Thanks
 
 
 |  |