title: "NHibernate.ObjectNotFoundException: No row with the given identifier exists" on access to child collection
body: <p>Little explanation: I have coupon series and coupons linked to the series.
  Some coupons may ne activated, and they are stored in the separate table.
  Here are my <em>.hbm.xml</em> files:</p>
  
  <pre><code>&lt;class name="AbstractCoupon" abstract="true"&gt;
  
  &lt;id name="Id"&gt;
    &lt;generator class="assigned" /&gt;
  &lt;/id&gt;
  
  &lt;property name="Number" not-null="true"&gt;
    &lt;column name="Number" length="40" unique-key="UNQ_CouponSeries_Number" index="IDX_CouponSeries_Number" /&gt;
  &lt;/property&gt;
  
  &lt;property name="IsDeleted" not-null="true"/&gt;
  
  &lt;many-to-one name="Series"
               class="iikoNet.Domain.BO.Coupon.CouponSeries"
               column="SeriesId"
               cascade="none"
               lazy="false"
               fetch="join"
               not-null="true"
               unique-key="UNQ_CouponSeries_Number"
               index="IDX_CouponSeries_Number" /&gt;
  
  &lt;union-subclass name="Coupon" table="Coupon" /&gt;
  
  &lt;union-subclass name="CouponActivated" table="CouponActivated"&gt;
    &lt;property name="WhenActivated" not-null="true" /&gt;
  &lt;/union-subclass&gt;
  </code></pre>
  
  <p></p>
  
  <pre><code>&lt;class name="CouponSeries"&gt;
  
  &lt;id name="Id"&gt;
    &lt;generator class="assigned" /&gt;
  &lt;/id&gt;
  
  &lt;property name="Name" not-null="true" /&gt;
  &lt;property name="WhenCreated" type="DateTime" not-null="true" /&gt;
  
  &lt;bag name="Coupons" inverse="true" cascade="none" lazy="true" generic="true"&gt;
    &lt;cache usage="nonstrict-read-write" /&gt;
    &lt;key column="SeriesId" /&gt;
    &lt;one-to-many class="AbstractCoupon" /&gt;
  &lt;/bag&gt;
  </code></pre>
  
  <p></p>
  
  <p>After deleting one of the coupon</p>
  
  <pre><code>public CouponActivated ActivateCoupon(ISession session, Coupon coupon, DateTimeOffset whenActivated)
          {
              Remove(session, coupon);
              var activatedCoupon = new CouponActivated(coupon, whenActivated);
              Add(session, activatedCoupon);
              return activatedCoupon;
          }
  </code></pre>
  
  <p>, I'm getting the list of coupons in the series (.First() is for simplicity). </p>
  
  <pre><code>var coupons = session.QueryOver&lt;CouponSeries&gt;()
                  .Where(cs =&gt; cs.Organization == organization)
                  .List()
                  .First()
                  .Coupons;
  </code></pre>
  
  <p>When I try to enumerate children collection <em>Coupons</em> of entity <em>CouponSeries</em>, I'm getting the mentioned exception with the full callstack like this :</p>
  
  <pre><code>NHibernate.ObjectNotFoundException: No row with the given identifier exists[myPrj.Domain.BO.Coupon.AbstractCoupon#85d31f2f-f282-11e5-afb6-50465db51863]
     at NHibernate.Impl.SessionFactoryImpl.DefaultEntityNotFoundDelegate.HandleEntityNotFound(String entityName, Object id)
     at NHibernate.Event.Default.DefaultLoadEventListener.Load(LoadEvent event, IEntityPersister persister, EntityKey keyToLoad, LoadType options)
     at NHibernate.Event.Default.DefaultLoadEventListener.ProxyOrLoad(LoadEvent event, IEntityPersister persister, EntityKey keyToLoad, LoadType options)
     at NHibernate.Event.Default.DefaultLoadEventListener.OnLoad(LoadEvent event, LoadType loadType)
     at NHibernate.Impl.SessionImpl.FireLoad(LoadEvent event, LoadType loadType)
     at NHibernate.Impl.SessionImpl.InternalLoad(String entityName, Object id, Boolean eager, Boolean isNullable)
     at NHibernate.Type.EntityType.ResolveIdentifier(Object id, ISessionImplementor session)
     at NHibernate.Type.ManyToOneType.Assemble(Object oid, ISessionImplementor session, Object owner)
     at NHibernate.Collection.Generic.PersistentGenericBag`1.InitializeFromCache(ICollectionPersister persister, Object disassembled, Object owner)
     at NHibernate.Cache.Entry.CollectionCacheEntry.Assemble(IPersistentCollection collection, ICollectionPersister persister, Object owner)
     at NHibernate.Event.Default.DefaultInitializeCollectionEventListener.InitializeCollectionFromCache(Object id, ICollectionPersister persister, IPersistentCollection collection, ISessionImplementor source)
     at NHibernate.Event.Default.DefaultInitializeCollectionEventListener.OnInitializeCollection(InitializeCollectionEvent event)
     at NHibernate.Impl.SessionImpl.InitializeCollection(IPersistentCollection collection, Boolean writing)
     at NHibernate.Collection.AbstractPersistentCollection.Initialize(Boolean writing)
     at NHibernate.Collection.AbstractPersistentCollection.Read()
     at NHibernate.Collection.Generic.PersistentGenericBag`1.GetEnumerator()
     at System.Linq.Enumerable.WhereSelectEnumerableIterator`2.MoveNext()
     at System.Collections.Generic.List`1..ctor(IEnumerable`1 collection)
     at System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source)
     at myPrj.Converters.CouponSeriesConverter.ToDto(CouponSeries series) in e:\Projects\myPrj\dev\CardService\myPrj.Converters\CouponSeriesConverter.cs:line 14
     at myPrj.Service.Coupons.CouponService.&lt;&gt;c__DisplayClass2.&lt;GetCoupons&gt;b__1(CouponSeries c) in e:\Projects\myPrj\dev\CardService\myPrj.Service\Coupons\CouponService.cs:line 30
     at System.Linq.Enumerable.WhereSelectListIterator`2.MoveNext()
     at System.Linq.Buffer`1..ctor(IEnumerable`1 source)
     at System.Linq.Enumerable.ToArray[TSource](IEnumerable`1 source)
     at myPrj.Service.Coupons.CouponService.&lt;&gt;c__DisplayClass2.&lt;GetCoupons&gt;b__0(ISession session) in e:\Projects\myPrj\dev\CardService\myPrj.Service\Coupons\CouponService.cs:line 29
     at myPrj.Common.Hibernate.DAL.HibernateSessionManager.CallTransacted[TResult](Func`2 func, Boolean commit) in e:\Projects\myPrj\dev\CardService\myPrj.Common.Hibernate\DAL\HibernateSessionManager.cs:line 172
     at myPrj.Common.Hibernate.DAL.HibernateSessionManager.CallTransacted[TResult](Func`2 func) in e:\Projects\myPrj\dev\CardService\myPrj.Common.Hibernate\DAL\HibernateSessionManager.cs:line 133
     at myPrj.Service.Coupons.CouponService.GetCoupons(Guid organizationOrNetworkId) in e:\Projects\myPrj\dev\CardService\myPrj.Service\Coupons\CouponService.cs:line 26
     at SyncInvokeGetCoupons(Object , Object[] , Object[] )
     at System.ServiceModel.Dispatcher.SyncMethodInvoker.Invoke(Object instance, Object[] inputs, Object[]&amp; outputs)
     at System.ServiceModel.Dispatcher.DispatchOperationRuntime.InvokeBegin(MessageRpc&amp; rpc)
     at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage5(MessageRpc&amp; rpc)
     at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage11(MessageRpc&amp; rpc)
     at System.ServiceModel.Dispatcher.MessageRpc.Process(Boolean isOperationContextSet)
  </code></pre>
  
  <p>Does anyone know what's the matter?
  I've tried setting <em>not-found="ignore"</em> to <em>many-to-one</em>, as they suggest in many topics, but that has nothing common to my situation.</p>