File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
Orm/Xtensive.Orm/Orm/Providers/Expressions Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -35,17 +35,17 @@ public SqlExpression IntToBoolean(SqlExpression expression)
3535 }
3636 }
3737
38- return SqlDml . NotEquals ( expression , 0 ) ;
38+ return SqlDml . Equals ( expression , 1 ) ;
3939 }
4040
4141 public SqlExpression BooleanToInt ( SqlExpression expression )
4242 {
4343 // optimization: omitting BooleanToInt(IntToBoolean(x)) sequences
44- if ( expression . NodeType == SqlNodeType . NotEquals ) {
44+ if ( expression . NodeType == SqlNodeType . Equals ) {
4545 var binary = ( SqlBinary ) expression ;
4646 var left = binary . Left ;
4747 var right = binary . Right as SqlLiteral < int > ;
48- if ( ! ReferenceEquals ( right , null ) && right . Value == 0 )
48+ if ( ! ReferenceEquals ( right , null ) && right . Value == 1 )
4949 return left ;
5050 }
5151
You can’t perform that action at this time.
0 commit comments