Spring.NET 1.3.0 RC1 for .NET 2.0 API Reference

HibernateTemplate.SaveOrUpdateCopy Method

Save or update the contents of given persistent object, according to its id (matching the configured "unsaved-value"?). Will copy the contained fields to an already loaded instance with the same id, if appropriate.

[Visual Basic]
Public NotOverridable Sub SaveOrUpdateCopy( _
   ByVal entity As Object _
) _
    Implements ICommonHibernateOperations.SaveOrUpdateCopy
[C#]
public object SaveOrUpdateCopy(
   object entity
);

Parameters

entity
The persistent object to save or update. (not necessarily to be associated with the Hibernate Session)

Return Value

The actually associated persistent object. (either an already loaded instance with the same id, or the given object)

Implements

ICommonHibernateOperations.SaveOrUpdateCopy

Exceptions

Exception Type Condition
DataAccessException In case of Hibernate errors

See Also

HibernateTemplate Class | Spring.Data.NHibernate Namespace