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

Allow to define default value in JDL for a field #25094

Closed
1 task done
OmarHawk opened this issue Feb 5, 2024 · 1 comment · Fixed by #25633
Closed
1 task done

Allow to define default value in JDL for a field #25094

OmarHawk opened this issue Feb 5, 2024 · 1 comment · Fixed by #25633

Comments

@OmarHawk
Copy link
Contributor

OmarHawk commented Feb 5, 2024

Overview of the feature request

It would be really helpful to define a default value in JDL for a given field. For example, we want to automatically have checkboxes checked / the proper values set in database with defaultValue option in liquibase on the column.

Motivation for or Use Case

Of course, we can implement this as a blueprint by ourselves, but if that's something that would be relevant/helpful for additional users apart from us, I could also contribute this as Pull Request here.

Idea would the be to have it like this, so as an annotation

entity A {
  @defaultValue(true) someBoolean Boolean
  @defaultValue("DEFAULT") someString String
  @defaultValue(1) someLong Long
}

This will then:

  • Change the default value in the form.service (Angular -> or others)
  • Set in Liquibase changelog the appropriate values

This would reduce the manual diff / effort for upgrading to a new JHipster version and may be helpful to others than us.

Related issues or PR

#13261

  • Checking this box is mandatory (this is just to show you read everything)
@OmarHawk OmarHawk changed the title Allow to define DefaultValue in JDL for a field Allow to define default value in JDL for a field Feb 5, 2024
OmarHawk added a commit to OmarHawk/generator-jhipster that referenced this issue Mar 18, 2024
OmarHawk added a commit to OmarHawk/generator-jhipster that referenced this issue Mar 18, 2024
OmarHawk added a commit to OmarHawk/generator-jhipster that referenced this issue Mar 18, 2024
OmarHawk added a commit to OmarHawk/generator-jhipster that referenced this issue Mar 18, 2024
OmarHawk added a commit to OmarHawk/generator-jhipster that referenced this issue Mar 19, 2024
OmarHawk added a commit to OmarHawk/generator-jhipster that referenced this issue Mar 20, 2024
@OmarHawk
Copy link
Contributor Author

OmarHawk commented Mar 20, 2024

Relates to #25564

OmarHawk added a commit to OmarHawk/generator-jhipster that referenced this issue Mar 22, 2024
OmarHawk added a commit to OmarHawk/generator-jhipster that referenced this issue Mar 22, 2024
OmarHawk added a commit to OmarHawk/generator-jhipster that referenced this issue Mar 22, 2024
OmarHawk added a commit to OmarHawk/generator-jhipster that referenced this issue Mar 22, 2024
OmarHawk added a commit to OmarHawk/generator-jhipster that referenced this issue Mar 25, 2024
OmarHawk added a commit to OmarHawk/generator-jhipster that referenced this issue Mar 25, 2024
OmarHawk added a commit to OmarHawk/generator-jhipster that referenced this issue Mar 25, 2024
OmarHawk added a commit to OmarHawk/generator-jhipster that referenced this issue Mar 25, 2024
OmarHawk added a commit to OmarHawk/generator-jhipster that referenced this issue Mar 26, 2024
OmarHawk added a commit to OmarHawk/generator-jhipster that referenced this issue Mar 26, 2024
OmarHawk added a commit to OmarHawk/generator-jhipster that referenced this issue Mar 26, 2024
OmarHawk added a commit to OmarHawk/generator-jhipster that referenced this issue Mar 26, 2024
OmarHawk added a commit to OmarHawk/generator-jhipster that referenced this issue Mar 27, 2024
OmarHawk added a commit to OmarHawk/generator-jhipster that referenced this issue Apr 2, 2024
OmarHawk added a commit to OmarHawk/generator-jhipster that referenced this issue Apr 2, 2024
OmarHawk added a commit to OmarHawk/generator-jhipster that referenced this issue Apr 2, 2024
OmarHawk added a commit to OmarHawk/generator-jhipster that referenced this issue Apr 3, 2024
OmarHawk added a commit to OmarHawk/generator-jhipster that referenced this issue Apr 8, 2024
OmarHawk added a commit to OmarHawk/generator-jhipster that referenced this issue Apr 8, 2024
OmarHawk added a commit to OmarHawk/generator-jhipster that referenced this issue Apr 12, 2024
OmarHawk added a commit to OmarHawk/generator-jhipster that referenced this issue Apr 15, 2024
OmarHawk added a commit to OmarHawk/jhipster.github.io that referenced this issue Apr 29, 2024
OmarHawk added a commit to OmarHawk/jhipster.github.io that referenced this issue Apr 29, 2024
OmarHawk added a commit to OmarHawk/jhipster.github.io that referenced this issue Apr 29, 2024
@mraible mraible added this to the 8.4.0 milestone Apr 30, 2024
DanielFran added a commit to jhipster/jhipster.github.io that referenced this issue Apr 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants