It's not a problem, but I see something wierd,
As I was testing an interceptor implementing following:
Code:
public bool OnSave(object entity, object id, object[] state, string[] propertyNames, NHibernate.Type.IType[] types)
{
IAuditItem item = entity as IAuditItem;
if( item != null )
{
item.LastUpdated = DateTime.Now;
return true; // indicate we've modified the object
}
else
return false; // indicate we didn't touch the entity
}
I found the SQL server complaining that my LastUpdated is out of range.
Stepping through the NHibernate code I see that my properties are overwritten by:
Code:
if( substitute )
{
persister.SetPropertyValues( theObj, values );
}
ServerSide artice (erroneously apparently) describes the return value as indicator that
the object has been modified. Would be nice to actually work with the object instead of 2 arrays.
Later it's followed by:
Code:
TypeFactory.DeepCopy( values, types, persister.PropertyUpdateability, values );
Is it me or the array is copied into itself? Is there a point?
Thanks,
E.