Starts in:
0 DAY
2 HRS
8 MIN
5 SEC
Starts in:
0 D
2 H
8 M
5 S

Activities of "berkansasmaz"

Answer

Thank you for reporting the issue.

I tested this situation and faced a similar situation.

I'm opening an issue about this. By the way, the ticket refunded

Answer

Actually, it's up to you, but I suggest you remove it. Because team members reading the code may have difficulty understanding why that code is there.

By the way, you can see the fix made here

Hi,

The best solution would be to update the abp version. If you have the opportunity to do this, you can make a smooth transition with the abp update command.

Please let me know if it works in your case.

Answer

This is a bug, we will fix it. by the way, ticket refunded : )

For now, can you try the code below;

        tenant.AddOrUpdateProperty<Boolean>(
                        "IsActive",
                    options =>
                        {
                            options.Attributes.Clear();
                        }
                    );

Please let me know if it works in your case.

Answer

Hello there,

I wrote the necessary codes to reproduce the problem. But it worked fine for me. You can find the codes I wrote to test below;

I updated the MyProjectNameEfCoreEntityExtensionMappings class in the MyProjectName.EntityFramework project.

    public static class MyProjectNameEfCoreEntityExtensionMappings
    {
        private static readonly OneTimeRunner OneTimeRunner = new OneTimeRunner();

        public static void Configure()
        {
            MyProjectNameGlobalFeatureConfigurator.Configure();
            MyProjectNameModuleExtensionConfigurator.Configure();

            OneTimeRunner.Run(() =>
            {
                ObjectExtensionManager.Instance
                    .MapEfCoreProperty<Tenant, Boolean?>(
                        "IsCheck",
                        (entityBuilder, propertyBuilder) =>
                        {
                            propertyBuilder.HasDefaultValue(null);
                        }
                    );
            });
        }
    }

Note: Maybe this step is not necessary for you. Note: This class can be used to map extra properties to table fields in the database. So don't forget to add migration and update the database.

Open the MyProjectNameDemoModuleExtensionConfigurator in the MyProjectName.Domain.Shared project, and I changed the contents of the ConfigureExtraProperties method as shown below:

        private static void ConfigureExtraProperties()
        {
            ObjectExtensionManager.Instance.Modules().ConfigureSaas(saas =>
            {
                saas.ConfigureTenant(tenant =>
                {
                    tenant.AddOrUpdateProperty<Boolean?>(
                        "IsCheck",
                        options =>
                        {
                            options.DefaultValue = null;
                        }
                    );
                });
            });
        }

Result

Please let me know if the solution worked for you :)

As with anything, it's a tradeoff. You can find why in the "Motivation" section of this article.

Can you please clarify what this means "To not have problem in your migration, don't include this mapping in the unified migration." If I create the "dublicate" entity into module A. I have to have entity configuration to map the entity into the same table. How would I then exclude the configuration from migration creation?

Actually, if you have done "Map this entity (AB2) to the same database table with B2" correctly, you should not have any problems.

Because it was already created by module B in that entity database. When you create a new entity with the same name in module A and configure it similarly, you will see that it is not included in the unified migration.

If it is included in the unified migration, there may be two different tables in your database doing the same job, in this case it is useful to check as it is not wanted.

You can also look here for an example.

This is a bug, we will fix it. by the way, ticket refunded : )

For now, can you try again after creating the following class under the **.Web/Pages/Account/Components/ProfileManagementGroup/PersonalInfo folders:

    [Dependency(ReplaceServices = true)]
    [ExposeServices(typeof(ConfirmPhoneNumberModalModel))]
    public class MyConfirmPhoneNumberModalModel : ConfirmPhoneNumberModalModel
    {
        private readonly IAccountAppService _accountAppService;
        
        public MyConfirmPhoneNumberModalModel(IAccountAppService accountAppService) : base(accountAppService)
        {
            _accountAppService = accountAppService;
        }

        public override async Task OnPostAsync()
        {
            await _accountAppService.ConfirmPhoneNumberAsync(new ConfirmPhoneNumberInput
            {
                UserId = CurrentUser.GetId(),
                Token = PhoneConfirmationToken
            });
        }
    }

Note: Folders are just for keeping order :)

Please let me know if it works in your case.

It is something like "How to join tables in a microservice system where each service has its own database".

Problem is similar because we've designed each module so that they can be deployed as a independent microservice if needed.

Isn't there any solution?

Performing a join assumes that both module tables will always be in the same database. With this assumption;

  • You have two modules: A & B.
  • A has entities like A1, A2, A3... and B has entities like B1, B2, B3.
  • You want to Join with A1 & B2 entities inside the A module's source code.

Problem: That's not possible because they are in different DbContexts. Solution:

  • Create a similar entity (AB2) to B2 in the A module (you can directly copy or create a similar entitiy with the only properties required for module A).
  • Map this entity (AB2) to the same database table with B2.
  • To not have problem in your migration, don't include this mapping in the unified migration.

You can find more information about the implementation here

If this answer does not help or is not sufficient to solve your question, please reply to me.

Hi,

I need the following information to better answer your question:

  • Your ABP Framework version.
  • Your User Interface type (Angular/MVC etc.)
Showing 341 to 350 of 354 entries
Made with ❤️ on ABP v9.1.0-preview. Updated on November 20, 2024, 13:06