What is the use of session.lock() method in Hibernate?

Session.lock() is a deprecated method in Hibernate. We should not use it.

Instead we should call buildLockRequest(LockMode).lock(entityName, object) method in Hibernate.

Leave a Reply

Your email address will not be published. Required fields are marked *