It looks like a bug... or a very non-intuitive behavior. You should open an Issue at http://jira.nhforge.org/
Diego On Sat, Apr 3, 2010 at 18:03, Jim Geurts <[email protected]> wrote: > Hey guys, > > I'm using the QueryOver api like: > > private Theme GetThemeByName(string name, User user) { > return _session.QueryOver<Theme>().Where(x => x.Name == name && > (x.User == null || x.User == user)).SingleOrDefault(); > } > > > Behind the scenes, it is generating sql similar to: > > SELECT this_.ThemeId as ThemeId7_0_, > this_.Name as Name7_0_, > this_.UserId as UserId7_0_ > FROM pm_Themes this_ > WHERE this_.IsDeleted = 0 /* @p0 */ > and (this_.Name = 'Test Theme-asfdyT6W' /* @p1 */ > and (this_.UserId = NULL /* @p2 */ > or this_.UserId = 691 /* @p3 */)) > > You'll notice that it uses an equal sign instead of the keyword "is" > for the UserId check. I'm using the MsSql2008Dialect dialect. Is > this an nhibernate configuration issue, a bug on my end, or a bug with > the QueryOver api? > > Thanks > > Jim > > -- > 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.
