Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AbpJsonValueComparer #20101

Open
1 task done
632374118 opened this issue Jun 25, 2024 · 0 comments
Open
1 task done

AbpJsonValueComparer #20101

632374118 opened this issue Jun 25, 2024 · 0 comments

Comments

@632374118
Copy link

Is there an existing issue for this?

  • I have searched the existing issues

Is your feature request related to a problem? Please describe the problem.

I Have a Entity:
public class ProductEntity : AuditedEntity
{
public string Name { get; set; }
public ListProductEntityContent { get; set; }
}
public class ProductContent
{
public string? ProductCode { get; set; }

public string? ProductSpecification { get; set; }

public string? BatchCode { get; set; }

}
I use the code below to configure EFCore:
builder.Property(propertyInfo.Name).HasConversion(new AbpJsonValueConverter());

I encountered a warning while performing database migration:
The property 'ProductEntity.StockEntryRequestContent' is a collection or enumeration type with a value converter but with no value comparer. Set a value comparer to ensure the collection/enumeration elements are compared correctly.

And when I execute the update method, ProductEntityContent is not updated to the database.

After checking the official documentation of EFCore, I found that a Value Comparer is required, but the ABP framework does not provide it

Describe the solution you'd like

Expected to add an AbpJsonValue Comparer

Additional context

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant