@@ -93,7 +93,8 @@ internal static void SetParameterTypes(
93
93
continue ;
94
94
}
95
95
96
- namedParameter . Type = GetParameterType ( sessionFactory , constantExpressions , visitor , namedParameter ) ;
96
+ namedParameter . Type = GetParameterType ( sessionFactory , constantExpressions , visitor , namedParameter , out var tryProcessInHql ) ;
97
+ namedParameter . IsGuessedType = tryProcessInHql ;
97
98
}
98
99
}
99
100
@@ -145,8 +146,10 @@ private static IType GetParameterType(
145
146
ISessionFactoryImplementor sessionFactory ,
146
147
HashSet < ConstantExpression > constantExpressions ,
147
148
ConstantTypeLocatorVisitor visitor ,
148
- NamedParameter namedParameter )
149
+ NamedParameter namedParameter ,
150
+ out bool tryProcessInHql )
149
151
{
152
+ tryProcessInHql = false ;
150
153
// All constant expressions have the same type/value
151
154
var constantExpression = constantExpressions . First ( ) ;
152
155
var constantType = constantExpression . Type . UnwrapIfNullable ( ) ;
@@ -158,7 +161,7 @@ private static IType GetParameterType(
158
161
159
162
if ( visitor . NotGuessableConstants . Contains ( constantExpression ) && constantExpression . Value != null )
160
163
{
161
- return null ;
164
+ tryProcessInHql = true ;
162
165
}
163
166
164
167
// No related MemberExpressions was found, guess the type by value or its type when null.
0 commit comments