It looks like the bug originates in the ReturnAliases property. This is supposed to be an array of strings containing the alias names, but it actually contains the alias position (zero-based) rather than the name.
I will investigate further this evening, to see how difficult it is to fix in current trunk. I already have the failing test case. John Davidson On Fri, Jul 16, 2010 at 10:22 AM, Muhammad Shehabeddeen < [email protected]> wrote: > Looks like it is an old and unresolved bug. > > > On Fri, Jul 16, 2010 at 5:12 PM, Richard Brown (gmail) < > [email protected]> wrote: > >> I think it's the same issue reported here: >> >> http://216.121.112.228/browse/NH-1968 >> >> >> *From:* Muhammad Shehabeddeen <[email protected]> >> *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]<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. >>>> >>> >>> -- >>> 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. >> >> -- >> 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. > -- 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.
