0
Ojala7 created
Hi,
I used the tool to create an entity with Primary key of type long. The entity only has one property of type string and is multilingual. I get these errors:
- This class is created public class abcTranslation : Entity<long> If I create with a primary key on int, it does not put the type at the end So I removed the <long> at the end it could build ok.
- I run the app and when I save a new entity I get this error: Microsoft.EntityFrameworkCore.DbUpdateException: An error occurred while saving the entity changes. See the inner exception for details. ---> System.InvalidCastException: Unable to cast object of type 'System.Int64' to type 'System.Int32'.
- in the DB the translation table has two columns CoreId and coreId1
3 Answer(s)
-
0
Hi @Ojala7,
I created an issue for it. You can follow the progress here https://github.com/aspnetzero/aspnet-zero-core/issues/5166
-
0
So how do I continue from here? How long will this take to fix?
-
0
Hi, you need to migrate it with efcore. This problem will resolved at next release.