Thanks - will take a look at that. I suspect it is an "AutoFlush" issue.

James

2009/4/6 Anne Epstein <[email protected]>

>
> More specifically, one possibility is that it could be that one of
> your types is getting cast from mapping to class. In any case, this
> post might help, it addresses the issue of entities being marked dirty
> when they shouldn't.
>
>
> http://nhforge.org/blogs/nhibernate/archive/2008/10/20/how-test-your-mappings-the-ghostbuster.aspx
>
>
> On Mon, Apr 6, 2009 at 7:48 AM, Fabio Maulo <[email protected]> wrote:
> > mappings
> >
> > 2009/4/6 James Crowley <[email protected]>
> >>
> >> Can anyone suggest what I might be doing wrong here? I'm seeing SQL
> >> updates to an entity (and its joined-subclass entities, as its part of a
> >> hirerachy), when the only thing that's been changed is a child
> collection
> >>
> >> I'm loading an entity from nHibernate. The entity is the root of an
> >> inheritance hierarchy, so a bunch of other bits are loaded in. The
> entity
> >> has a Version column set. I add some entities to a collection (mapped as
> a
> >> one-to-many to another table). And when calling Flush() on the
> NHibernate
> >> session suddenly it decides it needs to update the root entity, the
> related
> >> entity in the inheritance hierachy, *and* then insert the entities I
> added
> >> to the collection. I could understand if it was maybe just incrementing
> the
> >> Versioning column, but it's updating all the columns...
> >>
> >> I suspect I'm missing something fundamental here! Any tips would be much
> >> appreciated.
> >>
> >> James
> >>
> >>
> >
> >
> >
> > --
> > Fabio Maulo
> >
> > >
> >
>
> >
>


-- 
James Crowley
Managing Director
Developer Fusion - Connecting developers worldwide

Developer Fusion Ltd | 58 Sandringham Close | Enfield, EN1 3JH
mob: 07986 624128 web: http://www.developerfusion.com/

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