Spring.NET 1.3.0 RC1 for .NET 2.0 API Reference

HibernateTemplate.Update(Object, LockMode) Method

Update the given persistent instance. Obtains the specified lock mode if the instance exists, implicitly checking whether the corresponding database entry still exists (throwing an OptimisticLockingFailureException if not found).

[Visual Basic]
Public NotOverridable Overloads Sub Update( _
   ByVal entity As Object, _
   ByVal lockMode As LockMode _
) _
    Implements ICommonHibernateOperations.Update
[C#]
public void Update(
   object entity,
   LockMode lockMode
);

Parameters

entity
The persistent instance to update.
lockMode
The lock mode to obtain.

Implements

ICommonHibernateOperations.Update

Exceptions

Exception Type Condition
DataAccessException In case of Hibernate errors

See Also

HibernateTemplate Class | Spring.Data.NHibernate Namespace | HibernateTemplate.Update Overload List