Skip to content

Commit

Permalink
修正: 数据库存储与查询使用的默认集合名字不一致, 导致查询失败的BUG (#464)
Browse files Browse the repository at this point in the history
  • Loading branch information
kenkinky committed May 16, 2023
1 parent 30c4de6 commit 3442e0d
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ protected override void Awake(DBComponent self, string dbConnection, string dbNa

private static IMongoCollection<T> GetCollection<T>(this DBComponent self, string collection = null)
{
return self.database.GetCollection<T>(collection ?? typeof (T).Name);
return self.database.GetCollection<T>(collection ?? typeof (T).FullName);
}

private static IMongoCollection<Entity> GetCollection(this DBComponent self, string name)
Expand Down Expand Up @@ -114,7 +114,7 @@ public static async ETTask Query(this DBComponent self, long id, List<string> co
{
if (collection == null)
{
collection = typeof (T).Name;
collection = typeof (T).FullName;
}

using (await CoroutineLockComponent.Instance.Wait(CoroutineLockType.DB, RandomGenerator.RandInt64() % DBComponent.TaskCount))
Expand Down

0 comments on commit 3442e0d

Please sign in to comment.