Hi,
I have an issue with session.update at the minute.

I basically need the following method

void Reconnect<T>(T entity)
{
if (CurrentSession.Contains(entity)
  CurrentSession.Update(entity);
}

I need the check because there will be instances where my entity is
already in the session.

I'm using multiple-subclasses-per-table using a discriminator column,
and using linq to retrieve my entities.....

I have IUser, UserBase and CustomerUser, and am using
Session.Linq<IUser>(), the session statistics are getting a UserBase
object added, so CurrentSession.Contains(customer_user_entity) then
returns false, but when I go to update(customer_user_entity) and the
"user_entity" is there, I get a "object with the same key already
exists" exception.

Is there a way I can solve this issue?

Thanks,
Chris

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