hi,

the problem i'm having seems to only happen sometimes, and it's not
clear why it is.

i have a Tcket entity. Tickets can have callbacks. (IList<Callback>,
not lazy).

callbacks are mapped as inverse, but when a ticket is loaded, these
callbacks also get loaded.

here comes the issue and the unexplicable behavior..

1) user loads ticket, including callbacks, in the UI.
---- this involves a web service call, which spins up a session &
transaction, loads the ticket (including callbacks), then commits/
closes the trans/session.

2) user makes a change to ONLY the callback.

3) this callback (ONLY) is sent back to the server.
---- because I can't simply do session.Update(callback) -- because it
has a reference to the Ticket entity -- I load up the Ticket entity
and set it on the callback -> callback.Ticket =
session.Get<Ticket>(callback.ticketID);

4) I then call session.Update(callback) .. no problems .

5) HOWEVER, during commit, i get the aforementioned error.


actually, it's not quite that straightforward. SOMETIMES I will get an
error, other times, I will not. Usually, the first time a ticket is
loaded and a change is made to the callback only and it's saved, it
works. However, if I re-load that same ticket again, make another
change, and save, I get the error.

This worries me because I have 4 other lists of entities and they are
ALL mapped/updated in the exact same manner. However, I don't get
these kinds of problems with these other collections.

I do have all the entities involved here setup for 2nd level
caching ... could that be causing some problems somehow?

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