title: NHibernate: uninitialized proxy passed to save() and cascade
body: <p>I keep getting an NHibernate.PersistentObjectException when calling session.Save() which is due to an uninitialized proxy passed to save().  If I fiddle with my cascade settings I can make it go away, but then child objects aren't being saved.</p>
  
  <p>The only other fix I have found is by adding the following to my DefaultSaveEventListener.</p>
  
  <pre><code>    protected override bool ReassociateIfUninitializedProxy(object obj, global::NHibernate.Engine.ISessionImplementor source)
      {
          if (!NHibernateUtil.IsInitialized(obj))
              NHibernateUtil.Initialize(obj);
  
          return base.ReassociateIfUninitializedProxy(obj, source);
      } 
  </code></pre>
  
  <p>This is obviously not an ideal solution.</p>
  
  <p>Any ideas?</p>