修复字段null时order by错误
This commit is contained in:
parent
1342d13eb3
commit
0b525ce9f5
|
@ -106,6 +106,10 @@ namespace ShardingCore.Sharding.Enumerators
|
||||||
{
|
{
|
||||||
list.Add((IComparable)value);
|
list.Add((IComparable)value);
|
||||||
}
|
}
|
||||||
|
else if (value == null) // Support Nullable<xx>
|
||||||
|
{
|
||||||
|
list.Add(null);
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
throw new NotSupportedException($"order by value [{order}] must implements IComparable");
|
throw new NotSupportedException($"order by value [{order}] must implements IComparable");
|
||||||
|
@ -142,4 +146,4 @@ namespace ShardingCore.Sharding.Enumerators
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue