0
ya-dev created
- ABP Framework version: v4.0
Hi,
I've added extension column to users table which is a foreign key to another table. While creating a new tenant, framework tries to create an admin user for that tenant but it fails because of this extension column which is null while creating the admin user. How can I resolve this issue?
Thanks for your help.
Markdown supported.
Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)
4 Answer(s)
-
0
See https://docs.abp.io/en/abp/latest/Module-Entity-Extensions#default-value
Markdown supported.Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post) -
0
You can also specify default value for the extension property in {ProjectName}EfCoreEntityExtensionMappings.cs inside {ProjectName}.EntityFrameworkCore project like this.
ObjectExtensionManager.Instance .MapEfCoreProperty<IdentityUser, string>( "SocialSecurityNumber", (entityBuilder, propertyBuilder) => { propertyBuilder.HasDefaultValue("test"); } );Markdown supported.Copy, paste, or drag & drop images and files (max 100 MB per file, 100 MB total per post)