jhipster / generator-jhipster

JHipster is a development platform to quickly generate, develop, & deploy modern web applications & microservice architectures.
https://www.jhipster.tech
Apache License 2.0
21.57k stars 4.02k forks source link

Boolean entity attribute not set to false by default in generated insertion form #5289

Closed matthieusb closed 7 years ago

matthieusb commented 7 years ago
Overview of the issue

We generated an entity from a JDL file, containing some boolean attributes. The entities were generated correctly and checkboxes appeared in the adding form as expected. However, when completing all fields and pressing 'Save', the spring application controller return a 400 bad request error, as the entity object was not correct. This was caused by the checkboxes values : undefined rather than false when not checked.

Motivation for or Use Case

Unchecked checked boxes in entity form should be set to false by default when generating.

Reproduce the error

Here is the piece of code from the candidate entity we generated :

entity Candidate {
    paidKind Boolean required,
    taskPaid Boolean,
}

The generated HTML is the following :

<div class="form-group">
    <label class="form-control-label" jhiTranslate="recrutementApp.candidate.articleThirtySix" for="field_articleThirtySix">Article Thirty Six</label>
    <input type="checkbox" class="form-control" name="articleThirtySix" id="field_articleThirtySix"
           [(ngModel)]="candidate.articleThirtySix"
    />
    <div [hidden]="!(editForm.controls.articleThirtySix?.dirty && editForm.controls.articleThirtySix?.invalid)">
        <small class="form-text text-danger"
               [hidden]="!editForm.controls.articleThirtySix?.errors?.required" jhiTranslate="entity.validation.required">
            This field is required.
        </small>
    </div>
</div>
<div class="form-group">
    <label class="form-control-label" jhiTranslate="recrutementApp.candidate.paidKind" for="field_paidKind">Paid Kind</label>
    <input type="checkbox" class="form-control" name="paidKind" id="field_paidKind"
           [(ngModel)]="candidate.paidKind"
    />
    <div [hidden]="!(editForm.controls.paidKind?.dirty && editForm.controls.paidKind?.invalid)">
        <small class="form-text text-danger"
               [hidden]="!editForm.controls.paidKind?.errors?.required" jhiTranslate="entity.validation.required">
            This field is required.
        </small>
    </div>
</div>

The Js Console notifies that spring returns a 400 bad request error. When I display the "Candidate" json object sent to Spring, it displays :

Related issues
Suggest a Fix

There are several fixes possible, the first one being setting each checkbox to false automatically in the html when generating. As I had a lot of fields to take into account, I decided to set all the boolean values concerned to false in the candidate constructor.

Here is an exract of my candidate.model.ts file :

export class Candidate {
    constructor(
        public paidKind?: boolean,
        public taskPaid?: boolean,
    ) {
        this.paidKind = false;
        this.taskPaid = false;
    }
}
JHipster Version(s)
recrutement@0.0.0 /data/Documents/Ippon/Missions/Primobox/Git
├── UNMET PEER DEPENDENCY @angular/compiler@2.4.7
├── UNMET PEER DEPENDENCY @angular/core@2.4.7
└── generator-jhipster@4.0.5 
JHipster configuration, a .yo-rc.json file generated in the root folder
{
  "generator-jhipster": {
    "jhipsterVersion": "4.0.5",
    "baseName": "recrutement",
    "packageName": "com.primobox.euralis",
    "packageFolder": "com/primobox/euralis",
    "serverPort": "8080",
    "authenticationType": "session",
    "hibernateCache": "no",
    "clusteredHttpSession": false,
    "websocket": false,
    "databaseType": "sql",
    "devDatabaseType": "mssql",
    "prodDatabaseType": "mssql",
    "searchEngine": false,
    "messageBroker": false,
    "serviceDiscoveryType": false,
    "buildTool": "maven",
    "enableSocialSignIn": false,
    "rememberMeKey": "609be397d72bfc6f3e530bb778167c2c37fc9d89",
    "clientFramework": "angular2",
    "useSass": true,
    "clientPackageManager": "yarn",
    "applicationType": "monolith",
    "testFrameworks": [
      "cucumber"
    ],
    "jhiPrefix": "jhi",
    "otherModules": [
      {
        "name": "generator-jhipster-bootstrap-material-design",
        "version": "3.5.1"
      },
      {
        "name": "generator-jhipster-mssql",
        "version": "2.1.2"
      },
      {
        "name": "generator-jhipster-entity-audit-and-delete",
        "version": "2.2.2"
      },
      {
        "name": "generator-jhipster-webservice",
        "version": "0.1.0"
      }
    ],
    "enableTranslation": true,
    "nativeLanguage": "fr",
    "languages": [
      "fr",
      "en"
    ]
  }
}
Entity configuration(s) entityName.json files generated in the .jhipster directory

Candidate.json

{
    "fluentMethods": true,
    "relationships": [
        {
            "relationshipType": "one-to-one",
            "javadoc": "The user account for the candidate",
            "relationshipName": "user",
            "otherEntityName": "user",
            "otherEntityField": "id",
            "ownerSide": true,
            "otherEntityRelationshipName": "candidate"
        }
    ],
    "fields": [
        {
            "fieldName": "comment",
            "fieldType": "String",
            "fieldValidateRules": [
                "maxlength"
            ],
            "fieldValidateRulesMaxlength": 44
        },
        {
            "fieldName": "msaNumber",
            "fieldType": "String",
            "fieldValidateRules": [
                "required",
                "maxlength"
            ],
            "fieldValidateRulesMaxlength": 3
        },
        {
            "fieldName": "siretNumber",
            "fieldType": "String",
            "fieldValidateRules": [
                "required",
                "maxlength",
                "pattern"
            ],
            "fieldValidateRulesMaxlength": 14,
            "fieldValidateRulesPattern": "^([0-9]{14}|(et|ET|Et|eT)[0-9]{11})$"
        },
        {
            "fieldName": "companyName",
            "fieldType": "String",
            "fieldValidateRules": [
                "required",
                "maxlength",
                "pattern"
            ],
            "fieldValidateRulesMaxlength": 32,
            "fieldValidateRulesPattern": "^[a-zA-Z0-9 \\-&,'\\.]*$"
        },
        {
            "fieldName": "companyAddress1",
            "fieldType": "String",
            "fieldValidateRules": [
                "required",
                "maxlength",
                "pattern"
            ],
            "fieldValidateRulesMaxlength": 32,
            "fieldValidateRulesPattern": "^[a-zA-Z0-9 \\-&,'\\.]*$"
        },
        {
            "fieldName": "companyAddress2",
            "fieldType": "String",
            "fieldValidateRules": [
                "maxlength",
                "pattern"
            ],
            "fieldValidateRulesMaxlength": 32,
            "fieldValidateRulesPattern": "^[a-zA-Z0-9 \\-&,'\\.]*$"
        },
        {
            "fieldName": "companyPC",
            "fieldType": "String",
            "fieldValidateRules": [
                "required",
                "maxlength",
                "pattern"
            ],
            "fieldValidateRulesMaxlength": 5,
            "fieldValidateRulesPattern": "^[0-9]*$"
        },
        {
            "fieldName": "companyCity",
            "fieldType": "String",
            "fieldValidateRules": [
                "required",
                "maxlength",
                "pattern"
            ],
            "fieldValidateRulesMaxlength": 27,
            "fieldValidateRulesPattern": "^[a-zA-Z0-9 \\-&,'\\.]*$"
        },
        {
            "fieldName": "lastname",
            "fieldType": "String",
            "fieldValidateRules": [
                "required",
                "maxlength",
                "pattern"
            ],
            "fieldValidateRulesMaxlength": 32,
            "fieldValidateRulesPattern": "^[^\\-][a-zA-Z0-9 \\-']*[^\\-']$"
        },
        {
            "fieldName": "firstname",
            "fieldType": "String",
            "fieldValidateRules": [
                "required",
                "maxlength",
                "pattern"
            ],
            "fieldValidateRulesMaxlength": 32,
            "fieldValidateRulesPattern": "^[^\\-][a-zA-Z0-9 \\-']*[^\\-']$"
        },
        {
            "fieldName": "matricule",
            "fieldType": "String",
            "fieldValidateRules": [
                "maxlength",
                "pattern"
            ],
            "fieldValidateRulesMaxlength": 13,
            "fieldValidateRulesPattern": "^[0-9]{13}$"
        },
        {
            "fieldName": "birthDate",
            "fieldType": "ZonedDateTime",
            "fieldValidateRules": [
                "required"
            ]
        },
        {
            "fieldName": "birthInsee",
            "fieldType": "String",
            "fieldValidateRules": [
                "required",
                "maxlength"
            ],
            "fieldValidateRulesMaxlength": 3
        },
        {
            "fieldName": "hireDate",
            "fieldType": "ZonedDateTime",
            "fieldValidateRules": [
                "required"
            ]
        },
        {
            "fieldName": "codeNaf",
            "fieldType": "String",
            "fieldValidateRules": [
                "required",
                "maxlength",
                "pattern"
            ],
            "fieldValidateRulesMaxlength": 5,
            "fieldValidateRulesPattern": "^[a-zA-Z0-9]*$"
        },
        {
            "fieldName": "usename",
            "fieldType": "String",
            "fieldValidateRules": [
                "maxlength",
                "pattern"
            ],
            "fieldValidateRulesMaxlength": 32,
            "fieldValidateRulesPattern": "^[a-zA-Z0-9 \\-']*$"
        },
        {
            "fieldName": "sex",
            "fieldType": "String",
            "fieldValidateRules": [
                "required",
                "maxlength",
                "pattern"
            ],
            "fieldValidateRulesMaxlength": 1,
            "fieldValidateRulesPattern": "^(M|F)$"
        },
        {
            "fieldName": "birthDepartment",
            "fieldType": "String",
            "fieldValidateRules": [
                "required",
                "maxlength"
            ],
            "fieldValidateRulesMaxlength": 2
        },
        {
            "fieldName": "contractType",
            "fieldType": "String",
            "fieldValidateRules": [
                "maxlength"
            ],
            "fieldValidateRulesMaxlength": 2
        },
        {
            "fieldName": "cddEndDate",
            "fieldType": "ZonedDateTime"
        },
        {
            "fieldName": "trialPeriod",
            "fieldType": "Integer",
            "fieldValidateRules": [
                "required",
                "max"
            ],
            "fieldValidateRulesMax": 999
        },
        {
            "fieldName": "phone",
            "fieldType": "String",
            "fieldValidateRules": [
                "maxlength"
            ],
            "fieldValidateRulesMaxlength": 20
        },
        {
            "fieldName": "suffixDelegationAccount",
            "fieldType": "String",
            "fieldValidateRules": [
                "maxlength"
            ],
            "fieldValidateRulesMaxlength": 5
        },
        {
            "fieldName": "btapeCode",
            "fieldType": "String",
            "fieldValidateRules": [
                "required",
                "maxlength"
            ],
            "fieldValidateRulesMaxlength": 4
        },
        {
            "fieldName": "dpaeStatus",
            "fieldType": "String",
            "fieldValidateRules": [
                "required",
                "maxlength"
            ],
            "fieldValidateRulesMaxlength": 1
        },
        {
            "fieldName": "employerExemptionOccasionalWorker",
            "fieldType": "Boolean",
            "fieldValidateRules": [
                "required"
            ]
        },
        {
            "fieldName": "employerExemptionJobseeker",
            "fieldType": "Boolean",
            "fieldValidateRules": [
                "required"
            ]
        },
        {
            "fieldName": "noisyWork",
            "fieldType": "Boolean",
            "fieldValidateRules": [
                "required"
            ]
        },
        {
            "fieldName": "vribatingWork",
            "fieldType": "Boolean",
            "fieldValidateRules": [
                "required"
            ]
        },
        {
            "fieldName": "bioHazardWork",
            "fieldType": "Boolean",
            "fieldValidateRules": [
                "required"
            ]
        },
        {
            "fieldName": "nigthWork",
            "fieldType": "Boolean",
            "fieldValidateRules": [
                "required"
            ]
        },
        {
            "fieldName": "chemicalHazardWork",
            "fieldType": "Boolean",
            "fieldValidateRules": [
                "required"
            ]
        },
        {
            "fieldName": "otherRisksWork",
            "fieldType": "String",
            "fieldValidateRules": [
                "maxlength"
            ],
            "fieldValidateRulesMaxlength": 40
        },
        {
            "fieldName": "aptEquivalentWork",
            "fieldType": "Boolean",
            "fieldValidateRules": [
                "required"
            ]
        },
        {
            "fieldName": "disabledWorker",
            "fieldType": "Boolean",
            "fieldValidateRules": [
                "required"
            ]
        },
        {
            "fieldName": "longTimeSeasonal",
            "fieldType": "Boolean",
            "fieldValidateRules": [
                "required"
            ]
        },
        {
            "fieldName": "aptEquivalentWorkSameEmployer",
            "fieldType": "Boolean",
            "fieldValidateRules": [
                "required"
            ]
        },
        {
            "fieldName": "aptEquivalentWorkOtherEmployer",
            "fieldType": "Boolean",
            "fieldValidateRules": [
                "required"
            ]
        },
        {
            "fieldName": "addressComplement",
            "fieldType": "String",
            "fieldValidateRules": [
                "maxlength",
                "pattern"
            ],
            "fieldValidateRulesMaxlength": 25,
            "fieldValidateRulesPattern": "^[a-zA-Z0-9 \\-&,'\\.]*$"
        },
        {
            "fieldName": "addressNumber",
            "fieldType": "Integer",
            "fieldValidateRules": [
                "max"
            ],
            "fieldValidateRulesMax": 9999
        },
        {
            "fieldName": "addressBtq",
            "fieldType": "String",
            "fieldValidateRules": [
                "maxlength"
            ],
            "fieldValidateRulesMaxlength": 1
        },
        {
            "fieldName": "addressLaneType",
            "fieldType": "String",
            "fieldValidateRules": [
                "maxlength"
            ],
            "fieldValidateRulesMaxlength": 4
        },
        {
            "fieldName": "addressLane",
            "fieldType": "String",
            "fieldValidateRules": [
                "maxlength",
                "pattern"
            ],
            "fieldValidateRulesMaxlength": 25,
            "fieldValidateRulesPattern": "^[a-zA-Z0-9 \\-&,'\\.]*$"
        },
        {
            "fieldName": "addressPC",
            "fieldType": "String",
            "fieldValidateRules": [
                "required",
                "maxlength",
                "pattern"
            ],
            "fieldValidateRulesMaxlength": 5,
            "fieldValidateRulesPattern": "^[0-9]*$"
        },
        {
            "fieldName": "addressCity",
            "fieldType": "String",
            "fieldValidateRules": [
                "required",
                "maxlength",
                "pattern"
            ],
            "fieldValidateRulesMaxlength": 25,
            "fieldValidateRulesPattern": "^[a-zA-Z0-9 \\-&,'\\.]*$"
        },
        {
            "fieldName": "addressCountry",
            "fieldType": "String",
            "fieldValidateRules": [
                "required",
                "maxlength",
                "pattern"
            ],
            "fieldValidateRulesMaxlength": 3,
            "fieldValidateRulesPattern": "^[0-9]*$"
        },
        {
            "fieldName": "foreignResidentTax",
            "fieldType": "Boolean",
            "fieldValidateRules": [
                "required"
            ]
        },
        {
            "fieldName": "workLabel",
            "fieldType": "String",
            "fieldValidateRules": [
                "maxlength"
            ],
            "fieldValidateRulesMaxlength": 25
        },
        {
            "fieldName": "candidateType",
            "fieldType": "String",
            "fieldValidateRules": [
                "maxlength"
            ],
            "fieldValidateRulesMaxlength": 3
        },
        {
            "fieldName": "technicalWorker",
            "fieldType": "Boolean",
            "fieldValidateRules": [
                "required"
            ]
        },
        {
            "fieldName": "salaryGross",
            "fieldType": "Float",
            "fieldValidateRules": [
                "required"
            ]
        },
        {
            "fieldName": "hierarchyLevel",
            "fieldType": "String",
            "fieldValidateRules": [
                "maxlength"
            ],
            "fieldValidateRulesMaxlength": 5
        },
        {
            "fieldName": "partialTimeRate",
            "fieldType": "Float"
        },
        {
            "fieldName": "workplaceDepartment",
            "fieldType": "String",
            "fieldValidateRules": [
                "maxlength"
            ],
            "fieldValidateRulesMaxlength": 2
        },
        {
            "fieldName": "workplaceInsee",
            "fieldType": "String",
            "fieldValidateRules": [
                "maxlength"
            ],
            "fieldValidateRulesMaxlength": 3
        },
        {
            "fieldName": "executive",
            "fieldType": "Boolean",
            "fieldValidateRules": [
                "required"
            ]
        },
        {
            "fieldName": "agirc",
            "fieldType": "Boolean",
            "fieldValidateRules": [
                "required"
            ]
        },
        {
            "fieldName": "articleFour",
            "fieldType": "Boolean",
            "fieldValidateRules": [
                "required"
            ]
        },
        {
            "fieldName": "articleThirtySix",
            "fieldType": "Boolean",
            "fieldValidateRules": [
                "required"
            ]
        },
        {
            "fieldName": "paidKind",
            "fieldType": "Boolean",
            "fieldValidateRules": [
                "required"
            ]
        },
        {
            "fieldName": "taskPaid",
            "fieldType": "Boolean",
            "fieldValidateRules": [
                "required"
            ]
        },
        {
            "fieldName": "equivalentSchedule",
            "fieldType": "Boolean",
            "fieldValidateRules": [
                "required"
            ]
        },
        {
            "fieldName": "excludedMonthlyPay",
            "fieldType": "Boolean",
            "fieldValidateRules": [
                "required"
            ]
        },
        {
            "fieldName": "seasonal",
            "fieldType": "Boolean",
            "fieldValidateRules": [
                "required"
            ]
        },
        {
            "fieldName": "renewableCdd",
            "fieldType": "Boolean",
            "fieldValidateRules": [
                "required"
            ]
        },
        {
            "fieldName": "cddLength",
            "fieldType": "Integer",
            "fieldValidateRules": [
                "max"
            ],
            "fieldValidateRulesMax": 999
        },
        {
            "fieldName": "previousCddEndDate",
            "fieldType": "ZonedDateTime"
        },
        {
            "fieldName": "cddEndCause",
            "fieldType": "String",
            "fieldValidateRules": [
                "maxlength"
            ],
            "fieldValidateRulesMaxlength": 2
        },
        {
            "fieldName": "fileReference",
            "fieldType": "String",
            "fieldValidateRules": [
                "maxlength"
            ],
            "fieldValidateRulesMaxlength": 36
        },
        {
            "fieldName": "transmitCanal",
            "fieldType": "String",
            "fieldValidateRules": [
                "maxlength"
            ],
            "fieldValidateRulesMaxlength": 1
        },
        {
            "fieldName": "email",
            "fieldType": "String",
            "fieldValidateRules": [
                "maxlength"
            ],
            "fieldValidateRulesMaxlength": 50
        },
        {
            "fieldName": "mobile",
            "fieldType": "String",
            "fieldValidateRules": [
                "maxlength"
            ],
            "fieldValidateRulesMaxlength": 20
        }
    ],
    "changelogDate": "20170220135511",
    "entityTableName": "candidate",
    "dto": "no",
    "pagination": "infinite-scroll",
    "service": "serviceImpl"
}

Contract.json

{
    "fluentMethods": true,
    "relationships": [
        {
            "relationshipType": "many-to-one",
            "relationshipName": "candidate",
            "otherEntityName": "candidate",
            "otherEntityField": "id"
        },
        {
            "relationshipType": "many-to-one",
            "relationshipName": "template",
            "otherEntityName": "contractTemplate",
            "otherEntityField": "id"
        }
    ],
    "fields": [
        {
            "fieldName": "label",
            "fieldType": "String"
        },
        {
            "fieldName": "path",
            "fieldType": "String"
        }
    ],
    "changelogDate": "20170220135511",
    "entityTableName": "contract",
    "dto": "no",
    "pagination": "infinite-scroll",
    "service": "serviceImpl"
}

ContractTemplate.json

{
    "fluentMethods": true,
    "relationships": [],
    "fields": [
        {
            "fieldName": "label",
            "fieldType": "String"
        },
        {
            "fieldName": "code",
            "fieldType": "String"
        },
        {
            "fieldName": "filename",
            "fieldType": "String"
        }
    ],
    "changelogDate": "20170220135511",
    "entityTableName": "contract_template",
    "dto": "no",
    "pagination": "no",
    "service": "no"
}

ContractTemplateMapping.json

{
    "fluentMethods": true,
    "relationships": [
        {
            "relationshipType": "many-to-one",
            "relationshipName": "template",
            "otherEntityName": "contractTemplate",
            "otherEntityField": "id"
        }
    ],
    "fields": [
        {
            "fieldName": "label",
            "fieldType": "String"
        },
        {
            "fieldName": "code",
            "fieldType": "String"
        },
        {
            "fieldName": "mappingValue",
            "fieldType": "String"
        }
    ],
    "changelogDate": "20170220135511",
    "entityTableName": "contract_template_mapping",
    "dto": "no",
    "pagination": "no",
    "service": "no"
}

DpaeGeneration.json

{
    "fluentMethods": true,
    "relationships": [],
    "fields": [
        {
            "fieldName": "type",
            "fieldType": "DpaeGenerationType",
            "fieldValues": "OK,KO"
        },
        {
            "fieldName": "filename",
            "fieldType": "String"
        }
    ],
    "changelogDate": "20170220135511",
    "entityTableName": "dpae_generation",
    "dto": "no",
    "pagination": "infinite-scroll",
    "service": "serviceImpl"
}

Validation.json

{
    "fluentMethods": true,
    "relationships": [
        {
            "relationshipType": "many-to-one",
            "javadoc": "The candidate to validate",
            "relationshipName": "candidate",
            "otherEntityName": "candidate",
            "otherEntityField": "id"
        },
        {
            "relationshipType": "many-to-one",
            "javadoc": "The user validating the candidate",
            "relationshipName": "user",
            "otherEntityName": "user",
            "otherEntityField": "id"
        }
    ],
    "fields": [
        {
            "fieldName": "status",
            "fieldType": "ValidationStatus",
            "fieldValues": "PENDING,VALIDATED,REFUSED"
        },
        {
            "fieldName": "rank",
            "fieldType": "Integer"
        }
    ],
    "changelogDate": "20170220135511",
    "entityTableName": "validation",
    "dto": "no",
    "pagination": "no",
    "service": "no"
}
Browsers and Operating System

java version "1.8.0_66" Java(TM) SE Runtime Environment (build 1.8.0_66-b17) Java HotSpot(TM) 64-Bit Server VM (build 25.66-b17, mixed mode)

git version 2.7.4

node: v7.4.0

npm: 4.2.0

bower: 1.8.0

yeoman: 1.8.5

yarn: 0.20.3

Docker version 1.12.3, build 6b644ec

jdubois commented 7 years ago

Thanks for the report, indeed we missed this, and that's really important! Like you, I would just put "false" in the model, that's easier.

ramzimaalej commented 7 years ago

According to the HTML spec, we cannot do the following <input type="checkbox" checked="false"/> So, I'm defaulting boolean fields to false in the constructor.

https://github.com/jhipster/generator-jhipster/pull/5320

jdubois commented 7 years ago

Closing as the PR is merged

drez769 commented 6 years ago

Seems like this change can cause bugs. What if I want to construct an object with a boolean value starting as true?

export class Candidate {
    constructor(
        public paidKind?: boolean,
        public taskPaid?: boolean,
    ) {
        this.paidKind = false;
        this.taskPaid = false;
    }
}

Then let candidate = new Candidate(true, true); will create the object with false values! Instead, I think JHipster should automatically generate the constructor as:

this.paidKind = this.paidKind || false;
this.taskPaid = this.taskPaid || false;

Please see Typescript playground here: https://www.typescriptlang.org/play/#src=class%20Candidate%20%7B%0D%0A%20%20%20%20constructor(%0D%0A%20%20%20%20%20%20%20%20public%20paidKind%3F%3A%20boolean%2C%0D%0A%20%20%20%20%20%20%20%20public%20taskPaid%3F%3A%20boolean%2C%0D%0A%20%20%20%20)%20%7B%0D%0A%20%20%20%20%20%20%20%20this.paidKind%20%3D%20false%3B%0D%0A%20%20%20%20%20%20%20%20this.taskPaid%20%3D%20false%3B%0D%0A%20%20%20%20%7D%0D%0A%7D%0D%0A%0D%0Alet%20candidate%20%3D%20new%20Candidate(true%2C%20true)%3B%0D%0Aconsole.log(candidate)%3B%0D%0Aalert(JSON.stringify(candidate))%3B

I'm surprised this has never been an issue for anyone. Am I using code wrong or not following best practice? Should the constructor not be used to instantiate objects with data?

ruddell commented 6 years ago

@drez769 Looks correct, would you like to fix it in a Pull Request? The lines to change are: https://github.com/jhipster/generator-jhipster/blob/d237bd8a56521826482c0c28f3679bfaa4f7b169/generators/generator-base-private.js#L879-L885