From 1d33c6c2eecc877e76c2177e37b0e11fe05ed7df Mon Sep 17 00:00:00 2001 From: cryptooda Date: Fri, 9 Jan 2026 04:27:58 +0700 Subject: [PATCH] Update AgentSummaryRepository to clarify BacktestCount management - Added comments to indicate that BacktestCount is not updated directly in the entity, as it is managed independently via IncrementBacktestCountAsync. This change prevents other update operations from overwriting the BacktestCount, ensuring data integrity. --- .../PostgreSql/AgentSummaryRepository.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Managing.Infrastructure.Database/PostgreSql/AgentSummaryRepository.cs b/src/Managing.Infrastructure.Database/PostgreSql/AgentSummaryRepository.cs index 160999bb..d2798de1 100644 --- a/src/Managing.Infrastructure.Database/PostgreSql/AgentSummaryRepository.cs +++ b/src/Managing.Infrastructure.Database/PostgreSql/AgentSummaryRepository.cs @@ -276,7 +276,8 @@ public class AgentSummaryRepository : IAgentSummaryRepository entity.TotalVolume = domain.TotalVolume; entity.TotalBalance = domain.TotalBalance; entity.TotalFees = domain.TotalFees; - entity.BacktestCount = domain.BacktestCount; + // BacktestCount is NOT updated here - it's managed independently via IncrementBacktestCountAsync + // This prevents other update operations from overwriting the BacktestCount } private static AgentSummary MapToDomain(AgentSummaryEntity entity)