Base solution for your next web application
Open Closed

Runtime ef core model validation warnings after upgrading from ANZ 10.0 to 13.4 #12411


User avatar
0
hra created

We are undergoing a migration from ANZ 10 to 13, and are see a lot of logged warnings at runtime which never happened before.
These related to models in the default ANZ template - not our own.

I have checked the OnModelCreating in our DbContext, and it matches the template - so we dont appear to be missing any runtime efcore configuration.

Help please?

Thanks,

WARN  2025-03-28 00:12:44,913 [null)] [null)] [1    ] oft.EntityFrameworkCore.Model.Validation - The property 'SubscriptionPayment.ExtraProperties' 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.
WARN  2025-03-28 00:12:44,929 [null)] [null)] [1    ] oft.EntityFrameworkCore.Model.Validation - The property 'SubscriptionPaymentProduct.ExtraProperties' 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.
WARN  2025-03-28 00:12:45,008 [null)] [null)] [1    ] oft.EntityFrameworkCore.Model.Validation - No store type was specified for the decimal property 'AnnualPrice' on entity type 'SubscribableEdition'. This will cause values to be silently truncated if they do not fit in the default precision and scale. Explicitly specify the SQL server column type that can accommodate all the values in 'OnModelCreating' using 'HasColumnType', specify precision and scale using 'HasPrecision', or configure a value converter using 'HasConversion'.
WARN  2025-03-28 00:12:45,320 [null)] [null)] [1    ] oft.EntityFrameworkCore.Model.Validation - No store type was specified for the decimal property 'MonthlyPrice' on entity type 'SubscribableEdition'. This will cause values to be silently truncated if they do not fit in the default precision and scale. Explicitly specify the SQL server column type that can accommodate all the values in 'OnModelCreating' using 'HasColumnType', specify precision and scale using 'HasPrecision', or configure a value converter using 'HasConversion'.
WARN  2025-03-28 00:12:45,321 [null)] [null)] [1    ] oft.EntityFrameworkCore.Model.Validation - No store type was specified for the decimal property 'Amount' on entity type 'SubscriptionPaymentProduct'. This will cause values to be silently truncated if they do not fit in the default precision and scale. Explicitly specify the SQL server column type that can accommodate all the values in 'OnModelCreating' using 'HasColumnType', specify precision and scale using 'HasPrecision', or configure a value converter using 'HasConversion'.
WARN  2025-03-28 00:12:45,321 [null)] [null)] [1    ] oft.EntityFrameworkCore.Model.Validation - No store type was specified for the decimal property 'TotalAmount' on entity type 'SubscriptionPaymentProduct'. This will cause values to be silently truncated if they do not fit in the default precision and scale. Explicitly specify the SQL server column type that can accommodate all the values in 'OnModelCreating' using 'HasColumnType', specify precision and scale using 'HasPrecision', or configure a value converter using 'HasConversion'.
WARN  2025-03-28 01:17:06,113 [null)] [null)] [1    ] oft.EntityFrameworkCore.Model.Validation - The property 'SubscriptionPayment.ExtraProperties' 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.
WARN  2025-03-28 01:17:06,131 [null)] [null)] [1    ] oft.EntityFrameworkCore.Model.Validation - The property 'SubscriptionPaymentProduct.ExtraProperties' 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.
WARN  2025-03-28 01:17:06,239 [null)] [null)] [1    ] oft.EntityFrameworkCore.Model.Validation - No store type was specified for the decimal property 'AnnualPrice' on entity type 'SubscribableEdition'. This will cause values to be silently truncated if they do not fit in the default precision and scale. Explicitly specify the SQL server column type that can accommodate all the values in 'OnModelCreating' using 'HasColumnType', specify precision and scale using 'HasPrecision', or configure a value converter using 'HasConversion'.
WARN  2025-03-28 01:17:06,240 [null)] [null)] [1    ] oft.EntityFrameworkCore.Model.Validation - No store type was specified for the decimal property 'MonthlyPrice' on entity type 'SubscribableEdition'. This will cause values to be silently truncated if they do not fit in the default precision and scale. Explicitly specify the SQL server column type that can accommodate all the values in 'OnModelCreating' using 'HasColumnType', specify precision and scale using 'HasPrecision', or configure a value converter using 'HasConversion'.
WARN  2025-03-28 01:17:06,241 [null)] [null)] [1    ] oft.EntityFrameworkCore.Model.Validation - No store type was specified for the decimal property 'Amount' on entity type 'SubscriptionPaymentProduct'. This will cause values to be silently truncated if they do not fit in the default precision and scale. Explicitly specify the SQL server column type that can accommodate all the values in 'OnModelCreating' using 'HasColumnType', specify precision and scale using 'HasPrecision', or configure a value converter using 'HasConversion'.
WARN  2025-03-28 01:17:06,241 [null)] [null)] [1    ] oft.EntityFrameworkCore.Model.Validation - No store type was specified for the decimal property 'TotalAmount' on entity type 'SubscriptionPaymentProduct'. This will cause values to be silently truncated if they do not fit in the default precision and scale. Explicitly specify the SQL server column type that can accommodate all the values in 'OnModelCreating' using 'HasColumnType', specify precision and scale using 'HasPrecision', or configure a value converter using 'HasConversion'.

I see someone else reporting the same issue while migrating to v13 - however there is no public response from Volosoft on the resolution.
https://support.aspnetzero.com/QA/Questions/11884/Facing-issues-in-add-migration-Version-1300
Thanks


1 Answer(s)
  • User Avatar
    0
    oguzhanagir created
    Support Team

    Hi @hra

    Thank you for your feedback. We have created an issue for this. You can follow the developments here. Thank you.