Nothing that specifically messes with the erroring collection. I just
have some common event listeners: update logging and auditing.
What sort of problem could I arise and what is your hack?

On Dec 15, 2:45 pm, "allan.ritc...@gmail.com"
<allan.ritc...@gmail.com> wrote:
> 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 <andrewclawre...@gmail.com> 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 nhus...@googlegroups.com.
To unsubscribe from this group, send email to 
nhusers+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/nhusers?hl=en.


Reply via email to