I think it's the same issue reported here:

http://216.121.112.228/browse/NH-1968



From: Muhammad Shehabeddeen 
Sent: Friday, July 16, 2010 2:39 PM
To: [email protected] 
Subject: Re: [nhusers] Re: Select Count(*) with NOLOCK how to do that


                   session
                      .CreateQuery("select count(c.Number) from Candidate c 
where c.Template = :template")
                      .SetLockMode("c", LockMode.None)
                      .SetEntity("template", template)
                      .UniqueResult();


where Candidate and Template are mapped classes. 



On Fri, Jul 16, 2010 at 4:26 PM, John Davidson <[email protected]> wrote:

  Do you have a code snippet of how you are using SetLockMode and how you 
create the entity that is being aliased? 


  John Davidson


  On Fri, Jul 16, 2010 at 9:11 AM, Muhammad Shehabeddeen 
<[email protected]> wrote:

    So I take it that SetLockMode has a bug in it? 



    On Fri, Jul 16, 2010 at 3:56 PM, [email protected] 
<[email protected]> wrote:

      Start a transaction with readuncommitted.  It is the exact same
      thing.  My company has an incredibly anal DBA who demands this most of
      the time.  Good thing we aren't a banking system :)


      On Jul 16, 5:29 am, MSD <[email protected]> wrote:
      > I tried using SetLockMode(string alias, LockMode lockMode), but this
      > lead to an error: "could not locate alias to apply lock mode" which I
      > noticed in sql profiler. I ended up using CreateSQLQuery() which is
      > not a solution. Is there a solution?


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




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