Hello, I want to ask you how create records in Filemagement Module in FmDirectoryDescriptors table by accepting Multi-tenancy from application code.
from application code Im calling: _directoryDescriptorAppService.CreateAsync(new CreateDirectoryInput() { Name = project.Name, ParentId = rootId })
,but im not sure how to define/populate tenant id even that this attribure already exists in FmDirectoryDescriptors table.
in database this property is not populate when I created folder under tenant, like on picture below
also when im trying to create a new filemanagement directory from UI on FileManagement UI - folder is created but TenantID is not populated.
did I miss anything in confguration of this module?
thanks
- ABP Framework version: v3.0.5
- UI type: MVC
- Tiered (MVC) or Identity Server Seperated (Angular): no
- Exception message and stack trace:
- Steps to reproduce the issue:
2 Answer(s)
-
0
Hi @cleverplatform,
Thanks for opening that topic. You did not miss anything but unfortunately there is no work-around for that issue for now. In this development cycle (version 3.1) we had fix that issue. We are planning to release V3.1 Release Candidate in some days.
Off Topic: I have a suggestion for you, as you see at following code block (
CreateAsync
method ofDirectoryDescriptorAppService
), we useDirectoryManager
.var directoryDescriptor = await DirectoryManager.CreateAsync(input.Name, input.ParentId, CurrentTenant.Id); await DirectoryDescriptorRepository.InsertAsync(directoryDescriptor); return ObjectMapper.Map<DirectoryDescriptor, DirectoryDescriptorDto>(directoryDescriptor);
This module uses two domain service,
DirectoryManager
andFileManager
. We suggest to use those managers for creating/moving/deleting directory or files. -
0
credit for this question has been refunded.