|
From: Fabio M. (JIRA) <nh...@gm...> - 2011-04-25 14:17:47
|
[ http://216.121.112.228/browse/NH-2505?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Fabio Maulo updated NH-2505:
----------------------------
Description:
LINQ construction .Where( xxx => ( xxx.Alive == false ) )
produce SQL
case when player1_.Alive=1 then ''true'' else ''false'' end=case when @p2=''true'' then ''true'' else ''false'' end
Param @p2 sets like @p2=N'False'
I think the resulting SQL WHERE construction must be player1_.Alive=@p2 and param @p2 sets @p2=1 or 0
was:
LINQ construction .Where( xxx => ( xxx.Alive == false ) )
produce SQL
case when player1_.Alive=1 then ''true'' else ''false'' end=case when @p2=''true'' then ''true'' else ''false'' end
Param @p2 sets like @p2=N'False'
I think the resulting SQL WHERE construction must be player1_.Alive=@p2 and param @p2 sets @p2=1 or 0
Issue Type: Improvement (was: Bug)
It is not a bug since the query returns right results (in the trunk).
The "case" clause is unneeded.
> Querries with WHERE containing SQL Server 'bit' datatype produce CASE construction
> ----------------------------------------------------------------------------------
>
> Key: NH-2505
> URL: http://216.121.112.228/browse/NH-2505
> Project: NHibernate
> Issue Type: Improvement
> Components: Linq Provider
> Affects Versions: 3.0.0.GA
> Reporter: Alexei Shcherbakov
> Priority: Minor
>
> LINQ construction .Where( xxx => ( xxx.Alive == false ) )
> produce SQL
> case when player1_.Alive=1 then ''true'' else ''false'' end=case when @p2=''true'' then ''true'' else ''false'' end
> Param @p2 sets like @p2=N'False'
> I think the resulting SQL WHERE construction must be player1_.Alive=@p2 and param @p2 sets @p2=1 or 0
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://216.121.112.228/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
|