Are you doing anything in event listeners?  I would get this error if
I was doing a lazy load in a pre/post insert/update event.  I have a
hack to get around this but I wouldn't say it is a best practice.

On Dec 14, 9:31 pm, acl123 <[email protected]> wrote:
> I am receiving the following error:
>
> [AssertionFailure: collection [Foo.Bars] was not processed by flush()]
>    NHibernate.Engine.CollectionEntry.PostFlush(IPersistentCollection
> collection) +163
>    NHibernate.Event.Default.AbstractFlushingEventListener.PostFlush
> (ISessionImplementor session) +516
>    NHibernate.Event.Default.DefaultFlushEventListener.OnFlush
> (FlushEvent event) +112
>    NHibernate.Impl.SessionImpl.Flush() +297
>    ...
>
> Under no circumstances is my code in the transaction changing any Foos
> or Bars.
>
> The mapping looks like this:
>
>   <class xmlns="urn:nhibernate-mapping-2.2" name="MyProj.Foo, MyProj">
>     <cache usage="nonstrict-read-write" />
>
>     <bag cascade="all-delete-orphan" lazy="true" name="Bars"
> table="vehFooBars" order-by="Bar DESC">
>       <cache region="MyProj.Foo" usage="nonstrict-read-write" />
>       <key>
>         <column name="FooId" />
>       </key>
>       <element type="System.Int16">
>         <column name="Bar" />
>       </element>
>     </bag>
>
> The entity looks like this:
>
> public class Foo
> {
>     public IList<short> _bars = new List<short>();
>     public virtual IList<short> Bars
>     {
>        get { return _bars; }
>        set { _bars = value; }
>     }
>
> }
>
> What could be causing this error?

--

You received this message because you are subscribed to the Google Groups 
"nhusers" 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/nhusers?hl=en.


Reply via email to