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.55k stars 4.02k forks source link

7.5 : Invalid JsonIgnoreProperties values are generated #17245

Closed sbouchex closed 2 years ago

sbouchex commented 2 years ago
Overview of the issue

I'm importing a jdl and the generated java code got invalid JsonIgnoreProperties values generated whereas it was working fine with 6.x version.

Motivation for or Use Case

Some fieled are not exported once on the client-side.

Reproduce the error
JHipster Version(s)

7.4.1 on Windows

JHipster configuration
JHipster Version(s)
lignedurgence@0.0.1-SNAPSHOT D:\dev\sgdf\ligne-urgence-jh7                                                                                                          
+-- generator-jhipster-primeng@9.1.0                                                                                                                                
| `-- generator-jhipster@6.10.5                                                                                                                                     
`-- generator-jhipster@7.4.1                                                                                                                                        
JHipster configuration, a .yo-rc.json file generated in the root folder
.yo-rc.json file
                                                                                                                                                               
{                                                                                                                                                                   
  "generator-jhipster": {                                                                                                                                           
    "authenticationType": "jwt",                                                                                                                                    
    "cacheProvider": "ehcache",                                                                                                                                     
    "clientFramework": "angularX",                                                                                                                                  
    "serverPort": "8080",                                                                                                                                           
    "serviceDiscoveryType": false,                                                                                                                                  
    "skipUserManagement": false,                                                                                                                                    
    "withAdminUi": true,                                                                                                                                            
    "baseName": "lignedurgence",                                                                                                                                    
    "buildTool": "maven",                                                                                                                                           
    "databaseType": "sql",                                                                                                                                          
    "devDatabaseType": "h2Disk",                                                                                                                                    
    "enableHibernateCache": true,                                                                                                                                   
    "enableSwaggerCodegen": false,                                                                                                                                  
    "enableTranslation": true,                                                                                                                                      
    "jhiPrefix": "jhi",                                                                                                                                             
    "languages": ["fr"],                                                                                                                                            
    "messageBroker": false,                                                                                                                                         
    "prodDatabaseType": "mysql",                                                                                                                                    
    "searchEngine": false,                                                                                                                                          
    "testFrameworks": [],                                                                                                                                           
    "websocket": false,                                                                                                                                             
    "enableGradleEnterprise": false,                                                                                                                                
    "gradleEnterpriseHost": "",                                                                                                                                     
    "applicationType": "monolith",                                                                                                                                  
    "blueprints": [],                                                                                                                                               
    "clientPackageManager": "npm",                                                                                                                                  
    "clientTheme": "cosmo",                                                                                                                                         
    "clientThemeVariant": "primary",                                                                                                                                
    "creationTimestamp": 1586288251862,                                                                                                                             
    "dtoSuffix": "DTO",                                                                                                                                             
    "embeddableLaunchScript": false,                                                                                                                                
    "jhipsterVersion": "7.4.1",                                                                                                                                     
    "nativeLanguage": "fr",                                                                                                                                         
    "otherModules": [                                                                                                                                               
      {                                                                                                                                                             
        "name": "generator-jhipster-primeng"                                                                                                                        
      }                                                                                                                                                             
    ],                                                                                                                                                              
    "packageName": "fr.sgdf.lignedurgence",                                                                                                                         
    "packageFolder": "fr/sgdf/lignedurgence",                                                                                                                       
    "reactive": false,                                                                                                                                              
    "entitySuffix": "",                                                                                                                                             
    "applicationIndex": 0,                                                                                                                                          
    "entities": [                                                                                                                                                   
      "Action",                                                                                                                                                     
      "Appelant",                                                                                                                                                   
      "CalendrierPresence",                                                                                                                                         
      "Groupe",                                                                                                                                                     
      "Incident",                                                                                                                                                   
      "IncidentNature",                                                                                                                                             
      "Nature",                                                                                                                                                     
      "PiecesJointes",                                                                                                                                              
      "Procedure",                                                                                                                                                  
      "Rappel",                                                                                                                                                     
      "Ressource",                                                                                                                                                  
      "Saison",                                                                                                                                                     
      "SousNature",                                                                                                                                                 
      "Structure",                                                                                                                                                  
      "UserExtra",                                                                                                                                                  
      "Victime"                                                                                                                                                     
    ],                                                                                                                                                              
    "skipCheckLengthOfIdentifier": false,                                                                                                                           
    "skipFakeData": false,                                                                                                                                          
    "pages": [],                                                                                                                                                    
    "devServerPort": 4200,                                                                                                                                          
    "lastLiquibaseTimestamp": 1586289211000                                                                                                                         
  }                                                                                                                                                                 
}                                                                                                                                                                   

JDL for the Entity configuration(s) entityName.json files generated in the .jhipster directory
JDL entity definitions
                                                                                                                                                               
entity Action {                                                                                                                                                     
  /**                                                                                                                                                               
   * fieldName                                                                                                                                                      
   */                                                                                                                                                               
  date Instant                                                                                                                                                      
  details TextBlob                                                                                                                                                  
}                                                                                                                                                                   
entity Appelant {                                                                                                                                                   
  numeroAdherent Integer                                                                                                                                            
  territoire String maxlength(100)                                                                                                                                  
  groupe String maxlength(100)                                                                                                                                      
  codeStructure Integer                                                                                                                                             
  trancheDage TrancheAge                                                                                                                                            
  nom String                                                                                                                                                        
  prenom String                                                                                                                                                     
  type TypeAppelant                                                                                                                                                 
  coordonnees String                                                                                                                                                
  informations TextBlob                                                                                                                                             
}                                                                                                                                                                   
entity CalendrierPresence {                                                                                                                                         
  debut Instant required                                                                                                                                            
  fin Instant required                                                                                                                                              
}                                                                                                                                                                   
entity Groupe {                                                                                                                                                     
  nom String required unique maxlength(100)                                                                                                                         
  couleur String                                                                                                                                                    
  ordre Integer required                                                                                                                                            
  droitProcedureCreation Boolean required                                                                                                                           
  droitProcedureModification Boolean required                                                                                                                       
  droitProcedureSuppression Boolean required                                                                                                                        
  droitGroupeCreation Boolean required                                                                                                                              
  droitGroupeModification Boolean required                                                                                                                          
  droitGroupeSuppression Boolean required                                                                                                                           
  droitsStructure Boolean required                                                                                                                                  
  droitIncidentCreation Boolean required                                                                                                                            
  droitIncidentModification Boolean required                                                                                                                        
  droitIncidentCloture Boolean required                                                                                                                             
  droitIncidentReouverture Boolean required                                                                                                                         
  droitIncidentArchivage Boolean required                                                                                                                           
  droitIncidentRecherche Boolean required                                                                                                                           
  droitIncidentExtraction Boolean required                                                                                                                          
  droitIncidentAffichage Boolean required                                                                                                                           
  droitConfidentialiteAcces Boolean required                                                                                                                        
  droitConfidentialiteModification Boolean required                                                                                                                 
  droitConfidentialiteAttribution Boolean required                                                                                                                  
  accesRestreint Boolean required                                                                                                                                   
  droitIncidentAffichageArchive Boolean required                                                                                                                    
}                                                                                                                                                                   
entity Incident {                                                                                                                                                   
  dateheure Instant required                                                                                                                                        
  objet String required                                                                                                                                             
  details TextBlob required                                                                                                                                         
  lieu String                                                                                                                                                       
  departement String maxlength(10)                                                                                                                                  
  etat Etat                                                                                                                                                         
  pays String maxlength(100)                                                                                                                                        
  dateheureMaj Instant                                                                                                                                              
  codeStructure Integer                                                                                                                                             
  territoire String maxlength(100)                                                                                                                                  
  confidentiel Boolean required                                                                                                                                     
}                                                                                                                                                                   
entity IncidentNature {                                                                                                                                             
  principal Boolean                                                                                                                                                 
}                                                                                                                                                                   
entity Nature {                                                                                                                                                     
  libelle String                                                                                                                                                    
  actif Boolean required                                                                                                                                            
}                                                                                                                                                                   
entity PiecesJointes {                                                                                                                                              
  fichier String                                                                                                                                                    
}                                                                                                                                                                   
entity Procedure (jhi_procedure) {                                                                                                                                  
  nom String required unique maxlength(75)                                                                                                                          
  nomFichier String unique maxlength(100)                                                                                                                           
  themes String                                                                                                                                                     
  important Boolean required                                                                                                                                        
  envoiParMail Boolean required                                                                                                                                     
  themePrincipal String required                                                                                                                                    
}                                                                                                                                                                   
entity Rappel {                                                                                                                                                     
  /**                                                                                                                                                               
   * fieldName                                                                                                                                                      
   */                                                                                                                                                               
  date Instant                                                                                                                                                      
  details TextBlob                                                                                                                                                  
  etat EtatRappel                                                                                                                                                   
  emailEnvoiOk Boolean                                                                                                                                              
  emailEnvoiDate Instant                                                                                                                                            
}                                                                                                                                                                   
entity Ressource {                                                                                                                                                  
  nom String required unique maxlength(100)                                                                                                                         
  pieceJointe Boolean                                                                                                                                               
}                                                                                                                                                                   
entity Saison {                                                                                                                                                     
  nom String required unique maxlength(100)                                                                                                                         
  debut Instant required                                                                                                                                            
  fin Instant required                                                                                                                                              
  emailEnvoi Boolean required                                                                                                                                       
}                                                                                                                                                                   
entity SousNature {                                                                                                                                                 
  libelle String                                                                                                                                                    
  actif Boolean required                                                                                                                                            
}                                                                                                                                                                   
entity Structure {                                                                                                                                                  
  code Integer required unique                                                                                                                                      
  nom String required maxlength(100)                                                                                                                                
  etat STRUCTUREETAT required                                                                                                                                       
}                                                                                                                                                                   
entity UserExtra {                                                                                                                                                  
  telephone String required                                                                                                                                         
  telephoneSurcharge Boolean                                                                                                                                        
}                                                                                                                                                                   
entity Victime {                                                                                                                                                    
  numeroAdherent Integer                                                                                                                                            
  territoire String maxlength(100)                                                                                                                                  
  groupe String maxlength(100)                                                                                                                                      
  codeStructure Integer                                                                                                                                             
  trancheDage TrancheAge                                                                                                                                            
  informations TextBlob                                                                                                                                             
  nom String                                                                                                                                                        
  prenom String                                                                                                                                                     
}                                                                                                                                                                   
enum TrancheAge {                                                                                                                                                   
  FARFADET,                                                                                                                                                         
  LJ,                                                                                                                                                               
  SG,                                                                                                                                                               
  PK,                                                                                                                                                               
  COMPAS,                                                                                                                                                           
  VDL,                                                                                                                                                              
  ADULTE                                                                                                                                                            
}                                                                                                                                                                   
enum TypeAppelant {                                                                                                                                                 
  ADHERENT,                                                                                                                                                         
  PARENT,                                                                                                                                                           
  AUTRE                                                                                                                                                             
}                                                                                                                                                                   
enum Etat {                                                                                                                                                         
  OUVERT,                                                                                                                                                           
  CLOS,                                                                                                                                                             
  ARCHIVE,                                                                                                                                                          
  DOUBLON                                                                                                                                                           
}                                                                                                                                                                   
enum EtatRappel {                                                                                                                                                   
  ACTIF,                                                                                                                                                            
  TERMINE                                                                                                                                                           
}                                                                                                                                                                   
enum STRUCTUREETAT {                                                                                                                                                
  ACTIF,                                                                                                                                                            
  INACTIF                                                                                                                                                           
}                                                                                                                                                                   

relationship OneToOne {                                                                                                                                             
  Incident{appelant} to Appelant                                                                                                                                    
  UserExtra{user} to User                                                                                                                                           
}                                                                                                                                                                   
relationship OneToMany {                                                                                                                                            
  Incident{actions} to Action{source}                                                                                                                               
  Incident{natures} to IncidentNature{incident required}                                                                                                            
  Incident{piecesJointes} to PiecesJointes{incident}                                                                                                                
  Incident{rappels} to Rappel{source required}                                                                                                                      
  Groupe{ressources} to Ressource{groupe}                                                                                                                           
  Structure{sousstructure} to Structure{parent}                                                                                                                     
  Incident{victimes} to Victime{incident}                                                                                                                           
}                                                                                                                                                                   
relationship ManyToOne {                                                                                                                                            
  Action{userExtra required} to UserExtra                                                                                                                           
  CalendrierPresence{groupe} to Groupe                                                                                                                              
  CalendrierPresence{utilisateur} to UserExtra                                                                                                                      
  Incident{nature} to Nature                                                                                                                                        
  Incident{appele} to UserExtra                                                                                                                                     
  Incident{sousNature} to SousNature                                                                                                                                
  IncidentNature{nature required} to Nature                                                                                                                         
  IncidentNature{sousNature required} to SousNature                                                                                                                 
  PiecesJointes{ressource} to Ressource                                                                                                                             
  Rappel{userExtra required} to UserExtra                                                                                                                           
  SousNature{nature} to Nature                                                                                                                                      
}                                                                                                                                                                   
relationship ManyToMany {                                                                                                                                           
  Incident{resources} to Ressource{incident}                                                                                                                        
  Incident{acces} to UserExtra{accesIncidents}                                                                                                                      
  UserExtra{groupes} to Groupe{utilisateurs}                                                                                                                        
}                                                                                                                                                                   

Environment and Tools

openjdk version "11.0.12" 2021-07-20
OpenJDK Runtime Environment Temurin-11.0.12+7 (build 11.0.12+7)
OpenJDK 64-Bit Server VM Temurin-11.0.12+7 (build 11.0.12+7, mixed mode)

git version 2.30.0.windows.2

node: v16.13.0

npm: 8.1.0

No change to package.json was detected. No package manager install will be executed.
Congratulations, JHipster execution is complete!
Sponsored with ❤️ by @oktadev.

Entity configuration(s) entityName.json files generated in the .jhipster directory
Browsers and Operating System

Windows

github-actions[bot] commented 2 years ago

This issue is stale because it has been open 30 days with no activity. Our core developers tend to be more verbose on denying. If there is no negative comment, possibly this feature will be accepted. We are accepting PRs :smiley:. Comment or this will be closed in 7 days

sbouchex commented 2 years ago

keep open

sbouchex commented 2 years ago

The problem is also in the 7.5 version : Generated code is the same