On Mon, May 10, 2010 at 11:29 AM, Shadi Marei <[email protected]> wrote:

> Thanks Fabio, yet i don't think this is going to handle the OUTPUT clause,
> as the targeted SQL statement updates and selects the updated rows in one
> transaction. I think ExecuteUpdate is only for update/delete operations.
>
> On Mon, May 10, 2010 at 3:06 PM, Fabio Maulo <[email protected]> wrote:
>
>> CreateSQLQuery(...).ExecuteUpdate()
>>
>> On Mon, May 10, 2010 at 5:33 AM, Shadi Marei <[email protected]> wrote:
>>
>>> Is there any way to support the following SQL in NHibernate.
>>>
>>>          UPDATE TOP (?) Messages
>>>          SET IsLoaded = 1, LoadedOn = GETDATE()
>>>          OUTPUT Inserted.* { mainly represent Message object}
>>>          WHERE IsLoaded = 0 AND AccountId = ?
>>>
>>> I just want to load and lock loaded records which represent a set of
>>> Message objects each contains Account object (mapped through AccountId in
>>> db) which in turn need to be cached in 2nd-level cache.
>>>
>>> Thank you,
>>>
>>> --
>>> 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]<nhusers%[email protected]>
>>> .
>>> For more options, visit this group at
>>> http://groups.google.com/group/nhusers?hl=en.
>>>
>>
>>
>>
>> --
>> Fabio Maulo
>>
>>  --
>> 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]<nhusers%[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]<nhusers%[email protected]>
> .
> For more options, visit this group at
> http://groups.google.com/group/nhusers?hl=en.
>



-- 
Fabio Maulo

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