-
-
Notifications
You must be signed in to change notification settings - Fork 462
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
Single HiLo id generator per document store #1054
Comments
Resulting in unique ID's for each record in every table? If yes, nice enhancement 👍 |
@oakio I'd be worried about contention if you do this. Why is this valuable? |
The main reason is if I want to merge two tables into one, I will not have conflicts by id |
@oakio Okay, but this one is "I take pull requests";) Some kind of way to declare that the Hilo sequence is shared? |
I would argue that this is not a typical use case Marten users would encounter on a regular basis. So going ahead and closing this. |
Follow on note, please have a look at https://dba.stackexchange.com/questions/193788/what-can-go-wrong-using-the-same-sequence-across-multiple-tables-in-postgres. I would veto this feature in Marten. |
@mysticmind Would you accept a pull request that changes the current HiLoSequence behaviour to make it possible to override the entitiyname? by default the enitityname equals the doctype, but it can be overridden so you can have a sequence that is used by multiple tables. |
@oakio have you already started working on this request? |
@mdissel no |
Still relevant for you? |
At first sight it seems that this is necessary:
|
@mdissel yes, PRs are welcome :-) I notice that you have sent a PR, will review the same. |
No description provided.
The text was updated successfully, but these errors were encountered: