mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-06-28 04:35:29 +08:00
Update Mongodb
This commit is contained in:
parent
8420268e61
commit
ffc1a9e07a
@ -131,7 +131,7 @@ namespace SqlSugar.MongoDb
|
||||
#endregion
|
||||
|
||||
|
||||
#region GroupBy
|
||||
#region GroupBy
|
||||
if (this.GroupByValue.HasValue())
|
||||
{
|
||||
var regex = new Regex($@"\(\{UtilConstants.ReplaceCommaKey}\((.*?)\)\{UtilConstants.ReplaceCommaKey}\)",
|
||||
@ -153,7 +153,8 @@ namespace SqlSugar.MongoDb
|
||||
if (bson.Contains("fieldName"))
|
||||
{
|
||||
var field = bson["fieldName"].AsString;
|
||||
fieldNames.Add(field);
|
||||
operations[operations.Count - 1] = operations[operations.Count - 1].Replace($"\"${field}\"", $"\"$_id.{field}\"");
|
||||
fieldNames.Add(field);
|
||||
}
|
||||
// 构造 _id 部分:支持多字段形式
|
||||
var groupId = new BsonDocument();
|
||||
|
Loading…
Reference in New Issue
Block a user