-
Notifications
You must be signed in to change notification settings - Fork 3.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support Hi/Lo for database key generation.... #328
Comments
Is it something different that https://github.com/volosoft/abp/blob/master/framework/src/Volo.Abp.Guids/Volo/Abp/Guids/SequentialGuidGenerator.cs ? |
It is different to the Hi/Lo implementation but I believe it is superior as it
It does have some downsides however:
I don't see that much can be done about 1) and if performance is an issue then a time server being included on each work station would be something that DevOps would take care of. As for 2) this ultimately will mean that the POCO will not be DBMS agnostic unless.... the POCO would be declared something like: public class MyTableModel
{
[AbpSequenceGuid]
public Guid Id {get; set;}
} and when the migrations are generated the apropriate data type is chosen for the destination database? So for SQL Server uniqueidentifier, Oracle uuid etc.? To mitigate 3) I would think we need to create some extension methods so we can change between SequentialGuidType given an existing generated value. Conclusion: Using this Guid approach definitely gets my support as long as 2) and 3) can be solved with my proposed solutions or something similair. |
Thanks @natiki for details. Will spend time on that. |
Would improve performance as it eliminates database round trips:
The text was updated successfully, but these errors were encountered: