Allow to override primary key types of AbpUser, AbpRole, AbpTenant entities
See original GitHub issueNow AbpUserBase
derives from FullAuditedEntity<long>
so it is not possible to change primary key to int
for example. It was a headache when I was trying to integrate Abp framework to my existing project because it is not so easy to change type of primary key in the database.
Interestingly, AbpRole
and AbpTenant
derive from FullAuditedEntity<int>
.
Are there any reasons for that?
- Your Abp package version: 3.3.0
- Your base framework: .Net Core.
Issue Analytics
- State:
- Created 6 years ago
- Comments:5 (4 by maintainers)
Top Results From Across the Web
how to specify the same set of primary keys for all entities? ...
I have a number of entities and for each of them I need to specify a composite primary key: modelBuilder.Entity<MyEntity>HasKey(vf => new {...
Read more >Override Default Id as Primary Key #5931
I have been unable to determine how best to override the framework to make ANZ allow me to remove the default Id incremental...
Read more >Cannot use table 'AbpUsers' for entity type 'IdentityUser' since ...
Add a foreign key to 'IdentityUser' on the primary key properties and pointing to the primary key on another entity type mapped to...
Read more >Keys - EF Core
Configuring a primary key By convention, a property named Id or <type name>Id will be configured as the primary key of an entity....
Read more >ABP的Core2.0使用mysql数据,在使用linq语句报错了 - 博问
下面的错时在初始化数据的时候,在执行linq语句就报错了. No coercion operator is defined between types 'System.Int16' and 'System.Boo.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Ok, it makes sense. But on the other hand it is a bit weird that framework allows to specify primary key type for custom entities but not for User or Role. If you want to have Id as Guid for all entities - it is not possible. For some it can be a big drawback.
If you think that it will require a lot of work to make everything generic then maybe this feature should still be considered in some major release.
I really appreciate your hard work on making this awesome framework. I am just suggesting how to make it even greater.
The discussion is in #979.