File tree 2 files changed +21
-9
lines changed
src/EFCore.Relational/Query/Internal
test/EFCore.Sqlite.FunctionalTests/Query
2 files changed +21
-9
lines changed Original file line number Diff line number Diff line change @@ -142,9 +142,9 @@ private Expression VisitLeftJoin(LeftJoinExpression leftJoinExpression)
142
142
[ return : NotNullIfNotNull ( "sqlExpression" ) ]
143
143
private SqlExpression ? TryCompensateForBoolWithValueConverter ( SqlExpression ? sqlExpression )
144
144
{
145
- if ( sqlExpression is ColumnExpression columnExpression
146
- && columnExpression . TypeMapping ! . ClrType == typeof ( bool )
147
- && columnExpression . TypeMapping . Converter != null )
145
+ if ( ( sqlExpression is ColumnExpression or JsonScalarExpression )
146
+ && sqlExpression . TypeMapping ! . ClrType == typeof ( bool )
147
+ && sqlExpression . TypeMapping . Converter != null )
148
148
{
149
149
return _sqlExpressionFactory . Equal (
150
150
sqlExpression ,
Original file line number Diff line number Diff line change @@ -67,28 +67,40 @@ await AssertQuery(
67
67
""" ) ;
68
68
}
69
69
70
- [ ConditionalTheory ( Skip = "issue #30326" ) ]
71
70
public override async Task Json_predicate_on_bool_converted_to_int_zero_one ( bool async )
72
71
{
73
72
await base . Json_predicate_on_bool_converted_to_int_zero_one ( async) ;
74
73
75
- AssertSql ( ) ;
74
+ AssertSql (
75
+ """
76
+ SELECT "j"."Id", "j"."Reference"
77
+ FROM "JsonEntitiesConverters" AS "j"
78
+ WHERE json_extract("j"."Reference", '$.BoolConvertedToIntZeroOne') = 1
79
+ """ ) ;
76
80
}
77
81
78
- [ ConditionalTheory ( Skip = "issue #30326" ) ]
79
82
public override async Task Json_predicate_on_bool_converted_to_string_True_False ( bool async )
80
83
{
81
84
await base . Json_predicate_on_bool_converted_to_string_True_False ( async) ;
82
85
83
- AssertSql ( ) ;
86
+ AssertSql (
87
+ """
88
+ SELECT "j"."Id", "j"."Reference"
89
+ FROM "JsonEntitiesConverters" AS "j"
90
+ WHERE json_extract("j"."Reference", '$.BoolConvertedToStringTrueFalse') = 'True'
91
+ """ ) ;
84
92
}
85
93
86
- [ ConditionalTheory ( Skip = "issue #30326" ) ]
87
94
public override async Task Json_predicate_on_bool_converted_to_string_Y_N ( bool async )
88
95
{
89
96
await base . Json_predicate_on_bool_converted_to_string_Y_N ( async) ;
90
97
91
- AssertSql ( ) ;
98
+ AssertSql (
99
+ """
100
+ SELECT "j"."Id", "j"."Reference"
101
+ FROM "JsonEntitiesConverters" AS "j"
102
+ WHERE json_extract("j"."Reference", '$.BoolConvertedToStringYN') = 'Y'
103
+ """ ) ;
92
104
}
93
105
94
106
private void AssertSql ( params string [ ] expected )
You can’t perform that action at this time.
0 commit comments