Hi,

  I am able to work around it without use the suggestions of Allan. My
approach is to make a thread safe local copy of ObjectB in the
PreInsert(), PreUpdate() and PreDelete() event listeners and in the
OnFlush() event listener, load / create the appropriate ObjectA and
add ObjectB to ObjectA collection and execute the update. The main
thing is to select the ObjectA after execute update because NH by will
not flush the ObjectA if we delete or update the ObjectB by default.
Also the ObjectB.PropertyA should be nullable

On Oct 28, 5:41 am, Dan B <[email protected]> wrote:
> Yep, I had this problem implementing an auditing feature where the
> audit entry is an entity in a collection belonging to the entity being
> audited...
>
> I am using Allan Ritchie's solution 
> here:http://groups.google.com/group/nhusers/browse_thread/thread/1db7fd843...
>
> It does work, but I don't know what kind of horrors might be going on
> behind the scenes when the Assertion Failures are swallowed...
>
> On Oct 27, 10:51 pm, Krishna Jetti <[email protected]> wrote:
>
>
>
> > Hi,
>
> >  We have ObjectA and ObjectB and there is an 1:m relation from ObjectA
> > to ObjectB.  And we are having problems persisting the ObjectA in the
> > following case.
>
> >  In the OnPreDelete event handler for ObjectB, we load the ObjectA and
> > remove the ObjectB from ObjectA collection and change some property
> > values and calling the Update on session with ObjectA as parameter.
>
> >   I am getting exception as collection [ObjectA.PropertyB] was not
> > processed by flush(). Where PropertyB is HashSet<ObjectB>
>
> > Any help is appreciated- Hide quoted text -
>
> - Show quoted text -

-- 
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