Spring.NET 1.3.0 RC1 for .NET 2.0 API Reference

ICommonHibernateOperations.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 Sub Update( _
   ByVal entity As Object, _
   ByVal lockMode As LockMode _
)
[C#]
void Update(
   object entity,
   LockMode lockMode
);

Parameters

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

Exceptions

Exception Type Condition
DataAccessException In case of Hibernate errors

See Also

ICommonHibernateOperations Interface | Spring.Data.NHibernate Namespace | ICommonHibernateOperations.Update Overload List