Let's say I have one entity type that references another of the same
class.

public class Document : Entity
{
   public virtual string Name { get; set; }
   public virtual Document MyReferencedDocument { get; set; }
}

I have two Documents in my db -- One and Two.

One.MyReferencedDocument = Two
Two.MyReferencedDocument = null/irrelevant

If I Get One, then modify One.MyReferencedDocument.Name, then
SaveOrUpdate One, the new Name I just put on MyReferencedDocument will
save over what was in Two previously. That's cascading, of course...

But I can't figure out how to stop this from happening. I've tried:

public class MyConventions : IReferenceConvention
{
   public bool Accept(IManyToOnePart oPart)
   {
      return (true);
   }

   public void Apply(IManyToOnePart oPart)
   {
      oPart.Cascade.None();
   }
}

...but it isn't changing the behavior... Cascading saves still happen.
Is this expected? Did I miss something?

Thanks.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Fluent NHibernate" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/fluent-nhibernate?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to