Open Closed

Extra properties #4038


User avatar
0
jmalla.cp created
  • ABP Framework version: v6.0.0
  • UI type: MVC
  • DB provider: EF Core
  • Tiered (MVC) or Identity Server Separated (Angular): yes
  • Exception message and stack trace:
  • Steps to reproduce the issue:"

Hi everyone,

I'm having a problem when I try to expand some extra properties on IdentityUser.

What I want to do is put 2 extra properties on IdentityUser as a column in the table, and I need to be able to insert infromation from de UI

First of all, I followed abp documentación by putting this code:

public static class WebAppEfCoreEntityExtensionMappings { ..... > public static void Configure() > { > ..... > OneTimeRunner.Run(() => > { > > ObjectExtensionManager.Instance > > .MapEfCoreProperty<IdentityUser, AgentType>( > > ExtendedIdentityUserConsts.AgentTypePropertyName > > ); > > ObjectExtensionManager.Instance > > .MapEfCoreProperty<IdentityUser, int>( > > ExtendedIdentityUserConsts.AgentErpIdPropertyName > > ); > }); > } }

And

public static class WebAppModuleExtensionConfigurator { > ... > private static void ConfigureExtraProperties() > { > ObjectExtensionManager.Instance.Modules() > .ConfigureIdentity(identity => > { > identity.ConfigureUser(user => > { > user.AddOrUpdateProperty<AgentType>( > ExtendedIdentityUserConsts.AgentTypePropertyName > ); > user.AddOrUpdateProperty<int>( > ExtendedIdentityUserConsts.AgentErpIdPropertyName > ); > }); > }); > } }

And finally created migrations.

Now, I have tow new columns in my database's AbpUsers table and these columns appear in the UI, but when I insert information from the UI, the new properties information go to the Extraproperties column of the table with JSON format.

If I delete the content of WebAppModuleExtensionConfigurator and try to put the information from code, this information go to the correct columns of the table in the database but then I haven't insert the information from the UI.

How can I solve this issue?

Thanks for all


2 Answer(s)
  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    hi

    please try to upgrade to 6.0.1 we fixed a bug in 6.0.0.

  • User Avatar
    0
    jmalla.cp created

    Thanks, the issue was solved

Made with ❤️ on ABP v9.1.0-preview. Updated on November 11, 2024, 11:11