Update mongodb

This commit is contained in:
sunkaixuan
2025-08-20 18:50:03 +08:00
parent f698a5a485
commit 0c3b620002

View File

@@ -576,11 +576,11 @@ namespace SqlSugar.MongoDb
BsonValue memberName = new ExpressionVisitor(context).Visit(item);
BsonValue startValue = new ExpressionVisitor(context).Visit(start as Expression);
BsonValue lengthValue = new ExpressionVisitor(context).Visit(length as Expression);
if (startValue.IsString)
if (startValue.IsString&&ExpressionTool.GetParameters(start as Expression).Count>0)
{
startValue = UtilMethods.GetMemberName(startValue);
}
if (lengthValue.IsString)
if (lengthValue.IsString && ExpressionTool.GetParameters(length as Expression).Count > 0)
{
lengthValue = UtilMethods.GetMemberName(lengthValue);
}