Skip to content

Commit 371b8df

Browse files
committed
It seems comment belongs here
1 parent d10a057 commit 371b8df

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/NHibernate/Linq/Visitors/ParameterTypeLocator.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -123,12 +123,12 @@ private static HashSet<IType> GetCandidateTypes(
123123
var candidateTypes = new HashSet<IType>();
124124
foreach (var expression in constantExpressions)
125125
{
126+
// In order to get the actual type we have to check first the related member expressions, as
127+
// an enum is translated in a numeric type when used in a BinaryExpression and also it can be mapped as string.
128+
// By getting the type from a related member expression we also get the correct length in case of StringType
129+
// or precision when having a DecimalType.
126130
if (visitor.RelatedExpressions.TryGetValue(expression, out var relatedExpressions))
127131
{
128-
// In order to get the actual type we have to check first the related member expressions, as
129-
// an enum is translated in a numeric type when used in a BinaryExpression and also it can be mapped as string.
130-
// By getting the type from a related member expression we also get the correct length in case of StringType
131-
// or precision when having a DecimalType.
132132
foreach (var relatedExpression in relatedExpressions)
133133
{
134134
if (ExpressionsHelper.TryGetMappedType(sessionFactory, relatedExpression, out var candidateType, out _, out _, out _))

0 commit comments

Comments
 (0)