Skip to content
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

Add support to custom ids. #13258

Merged
merged 12 commits into from
Dec 14, 2020
Merged

Add support to custom ids. #13258

merged 12 commits into from
Dec 14, 2020

Conversation

mshima
Copy link
Member

@mshima mshima commented Dec 12, 2020

This PR adds support to custom ids:

entity Foo {
  id UUID
}

and

entity Foo {
  @Id customId Long
}

Relationships are not complete yet.
Angular and CI changes split into #13257 and #13204

Related to #7112


Please make sure the below checklist is followed for Pull Requests.

When you are still working on the PR, consider converting it to Draft (bellow reviewers) and adding skip-ci label, you can still see CI build result at your branch.

@mshima mshima marked this pull request as draft December 12, 2020 18:54
@mshima mshima marked this pull request as ready for review December 12, 2020 18:55
@pascalgrimaud
Copy link
Member

Which type can we use ? UUID ? Long ?

@mshima
Copy link
Member Author

mshima commented Dec 12, 2020

Which type can we use ? UUID ? Long ?

Both with auto generation.
Others with manual generation, but I didn't try.

entity Foo {
  @AutoGenerate(false) @Id String customId
}

@mraible
Copy link
Contributor

mraible commented Dec 12, 2020

It would be cool if we could generate UUIDs instead of Long for IDs. My 21-Points Health app has been in production for over 5 years and it has issues with Long. I created this PR to fix it, but I'm hesitant to merge it because it's not a standard JHipster feature and it'll be difficult to build the app again for JHipster 7.

@mshima
Copy link
Member Author

mshima commented Dec 14, 2020

Merging this later today if there is not objections.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants