Skip to content

ExtraProperties are no longer being persisted. #24410

@lommez

Description

@lommez

Is there an existing issue for this?

  • I have searched the existing issues

Description

Hi,

I'm using ABP 10.1, and I'm having trouble persisting ExtraProperties in the SQL Server database.

My code hasn't changed in terms of how to save this data in this property.

Has anyone else experienced this problem?

On EfCoreEntityExtensionMappings.cs, i´ve done some thing like:

            ObjectExtensionManager.Instance
                .MapEfCoreProperty<IdentityUser, string>(
                    "Field1",
                    (entityBuilder, propertyBuilder) =>
                    {
                        propertyBuilder.HasMaxLength(255);
                        propertyBuilder.HasColumnType("varchar");
                    }
                );

Before save data i'm doing this, and have checked if ExtraProperties is populated, and it is.

        input.MapExtraPropertiesTo(user);

        (await UserManager.UpdateAsync(user)).CheckErrors();

Also i´ve checked the SQL Server profile and as you see, the parameter p2 is a blank json value '{}'

exec sp_executesql N'SET IMPLICIT_TRANSACTIONS OFF;
SET NOCOUNT ON;
UPDATE [AbpUsers] SET [ConcurrencyStamp] = @p0, [EntityVersion] = @p1, [ExtraProperties] = @p2, [LastModificationTime] = @p3
OUTPUT 1
WHERE [Id] = @p4 AND [ConcurrencyStamp] = @p5;
',N'@p4 uniqueidentifier,@p0 varchar(40),@p5 varchar(40),@p1 int,@p2 nvarchar(4000),@p3 datetime2(7)',@p4='74255323-E7CC-DA77-596E-3A1DA6A8B3FF',@p0='2a13936694cc490493161b209ec95dbc',@p5='ad3a1a2b0f7945fca03dcb3c4097afbc',@p1=20,@p2=N'{}',@p3='2025-12-12 11:46:49.0532847'

Or could it be a bug?

Reproduction Steps

No response

Expected behavior

No response

Actual behavior

No response

Regression?

No response

Known Workarounds

No response

Version

10.1

User Interface

MVC

Database Provider

EF Core (Default)

Tiered or separate authentication server

None (Default)

Operation System

Windows (Default)

Other information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions