0
raju.thinnaluri@gmail.com created
Hi,
We are using Microservice Modal.
When user details are updating as a SaaS user chat users table data updating. but as a Tenant if updated the user details not updating the respective tenant user data in Chat user table.
- ABP Framework version: v5.3.4
- UI type: Blazor
- DB provider: EF Core
- Tiered (MVC): yes
- Exception message and stack trace:
- Steps to reproduce the issue:"
3 Answer(s)
-
0
Hi,
I will check it.
-
1
Hi,
The problem was fixed: https://github.com/abpframework/abp/pull/14022
You can upgrade your project to the latest version.
you can try this if you don't want to upgrade project:
[ExposeServices(typeof(ChatUserSynchronizer), typeof(MyChatUserSynchronizer))] public class MyChatUserSynchronizer : ChatUserSynchronizer { protected ICurrentTenant CurrentTenant { get; } public MyChatUserSynchronizer( IChatUserRepository userRepository, IChatUserLookupService userLookupService, ICurrentTenant currentTenant) : base(userRepository, userLookupService) { CurrentTenant = currentTenant; } public override async Task HandleEventAsync(EntityUpdatedEto<UserEto> eventData) { using(CurrentTenant.Change(eventData.Entity.TenantId)) { var user = await UserRepository.FindAsync(eventData.Entity.Id); if (user == null) { user = await UserLookupService.FindByIdAsync(eventData.Entity.Id); if (user == null) { return; } } if (user.Update(eventData.Entity)) { await UserRepository.UpdateAsync(user); } } } }
-
0
Hi,
The problem was fixed: https://github.com/abpframework/abp/pull/14022
You can upgrade your project to the latest version.
you can try this if you don't want to upgrade project:
[ExposeServices(typeof(ChatUserSynchronizer), typeof(MyChatUserSynchronizer))] public class MyChatUserSynchronizer : ChatUserSynchronizer { protected ICurrentTenant CurrentTenant { get; } public MyChatUserSynchronizer( IChatUserRepository userRepository, IChatUserLookupService userLookupService, ICurrentTenant currentTenant) : base(userRepository, userLookupService) { CurrentTenant = currentTenant; } public override async Task HandleEventAsync(EntityUpdatedEto<UserEto> eventData) { using(CurrentTenant.Change(eventData.Entity.TenantId)) { var user = await UserRepository.FindAsync(eventData.Entity.Id); if (user == null) { user = await UserLookupService.FindByIdAsync(eventData.Entity.Id); if (user == null) { return; } } if (user.Update(eventData.Entity)) { await UserRepository.UpdateAsync(user); } } } }
Thank You. Now it's working fine.