protected override bool ShouldRecreateInstance(object value, Type type, string prefix, Node node)
{
if (IsContainerType(type))
{
return true;
}
if (node != null && CurrentARModel != null)
{
// If it's a belongsTo ref, we need to recreate it
// instead of overwrite its properties, otherwise NHibernate will complain
if (IsBelongsToRef(CurrentARModel, prefix))
{
return true;
}
}
return base.ShouldRecreateInstance(value, type, prefix, node);
}