Skip to content

Commit 89034e6

Browse files
Add a missing short circuit in query parameter expansion.
* This should have been the fix for NH-3050.
1 parent fa8ca75 commit 89034e6

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/NHibernate/Impl/ExpressionQueryImpl.cs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,13 @@ protected override IQueryExpression ExpandParameters(IDictionary<string, TypedVa
6666
map.Add(name, aliases);
6767
}
6868

69+
if (map.Count == 0)
70+
{
71+
// No list parameter needs to be replaced: they are all single valued. They just need
72+
// to be retyped, which has been done above.
73+
return QueryExpression;
74+
}
75+
6976
//TODO: Do we need to translate expression one more time here?
7077
var newTree = ParameterExpander.Expand(QueryExpression.Translate(Session.Factory, false), map);
7178
var key = new StringBuilder(QueryExpression.Key);

0 commit comments

Comments
 (0)