Expert |
|
Joined: Thu Dec 14, 2006 5:57 am Posts: 1185 Location: Zurich, Switzerland
|
You can evict objects from the session, but then you have to save them again:
session.Evict(obj);
...
work on the ojects
...
foreach changed object
session.Update();
In this scenario, you have to check manually if the objects have changed, otherwise you get unnecessary updates to the db.
Can't you use two sessions ? That would be a much nicer and cleaner way to solve that. But I guess you wouln't have asked, if you could.
_________________ --Wolfgang
|
|