Use a deidcated session for the view and call ISession.Clear() before the query.

-Markus

2010/7/24 Jason Dentler <[email protected]>:
> First, AFAIK, the query is still executed. Any new objects will be returned,
> and any deleted objects won't be returned. It sounds like your issue is that
> the remaining objects return the same instance from the session. Do you want
> a new instance or to simply refresh the data in the existing instance?
> To get a new instance, first session.Evict(obj).
> To update an existing instance, use session.Refresh(obj). Note that this is
> a SELECT N+1 situation.
> On Sat, Jul 24, 2010 at 6:21 AM, alexey_baranov <[email protected]> wrote:
>>
>> Hi!
>>
>> I have a long lived treeView in my UI form and I would like to
>> implement Refresh option for user.
>> When I try query some Objs from database like
>>
>> from Obj o where o.Parent= :parent order by o.Name
>>
>> they would be got from Session cahe. Can I ask NH to query Objs
>> exactly from database not from the UOW?
>>
>> Thanks!
>>
>> --
>> 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.
>>
>
> --
> 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.
>

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