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

Improve autoGenerate logic. #14679

Merged
merged 1 commit into from
Apr 15, 2021
Merged

Conversation

mshima
Copy link
Member

@mshima mshima commented Apr 14, 2021

Related to #14659 and #14108


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.

field.liquibaseAutoIncrement = false;
field.jpaGeneratedValue = false;
field.autoGenerateByService = field.fieldType === UUID;
field.autoGenerateByRepository = !field.autoGenerateByService;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this one mandatory?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I mean, a not is acceptable in a template, the illustration is that you use f => !f.autoGenerateByRepository instead of its service counterpart in your PR :-p.
Choose you poison, but keep only one please (if there is a vote, I would choose the autoGenerateByServiceone, as it is the less standard)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

They are different:
f => !f.autoGenerateByRepository should be f => !f.autoGenerate || f.autoGenerateByService

If you still think it's better remove one of them, I can do it.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Got it!

@Tcharl
Copy link
Contributor

Tcharl commented Apr 15, 2021

Good to me

@Tcharl Tcharl merged commit 303b636 into jhipster:main Apr 15, 2021
@mshima mshima deleted the skip_ci-autogenerate branch April 15, 2021 11:11
@pascalgrimaud pascalgrimaud added this to the 7.1.0 milestone May 28, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants