Cascade Saves with Fluent NHibernate AutoMapping

Posted by Ryan Montgomery on Stack Overflow See other posts from Stack Overflow or by Ryan Montgomery
Published on 2009-02-25T17:02:51Z Indexed on 2010/03/15 14:29 UTC
Read the original article Hit count: 386

How do I "turn on" cascading saves using AutoMap Persistence Model with Fluent NHibernate?

As in:

I Save the Person and the Arm should also be saved. Currently I get

"object references an unsaved transient instance - save the transient instance before flushing"

public class Person : DomainEntity
{
  public virtual Arm LeftArm { get; set; }
}

public class Arm : DomainEntity
{
  public virtual int Size { get; set; }
}

I found an article on this topic, but it seems to be outdated.

© Stack Overflow or respective owner

Related posts about fluent-nhibernate

Related posts about automapping