question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Allow to override primary key types of AbpUser, AbpRole, AbpTenant entities

See original GitHub issue

Now 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:closed
  • Created 6 years ago
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
ogixcommented, Jan 30, 2018

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.

0reactions
acjhcommented, Sep 28, 2018

The discussion is in #979.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found