-
-
Notifications
You must be signed in to change notification settings - Fork 4k
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
PropertyAccessException on Delete and Update Operations for Entities with Enum Fields in JHipster 8.6 #27030
Comments
Post the |
Hello, Receive below the output Welcome to JHipster v8.6.0 Welcome to the JHipster Information Sub-Generator
JHipster configuration, a
|
JHipster has completed the sample check This check uses |
Tests are passing using main branch. |
Overview of the issue
I encountered a
PropertyAccessException
when trying to delete or update an entity that includes enum type fields. The error message is: "Could not set value of type [sn.sonatel.dsi.ftsirc.domain.enumeration.Engagement]: 'sn.sonatel.dsi.ftsirc.domain.Projet.engagementBuild' (setter)". The issue does not occur during the creation or reading of the entity, only during delete and update operations. This problem is related to the handling of enum types in entities generated by JHipster version 8.6.Motivation for or Use Case
This bug is critical as it disrupts the functionality of delete and update operations on entities containing enum type fields, which are essential operations in most applications.
Reproduce the error
PropertyAccessException
being thrown.Welcome to the JHipster Information Sub-Generator
JHipster configuration, a
.yo-rc.json
file generated in the root folder.yo-rc.json file
Environment and Tools
java version "21.0.1" 2023-10-17 LTS
Java(TM) SE Runtime Environment (build 21.0.1+12-LTS-29)
Java HotSpot(TM) 64-Bit Server VM (build 21.0.1+12-LTS-29, mixed mode, sharing)
git version 2.37.1
node: v20.16.0
npm: 10.8.1
Docker version 26.1.1, build 4cf5afa
JDL for the Entity configuration(s)
entityName.json
files generated in the.jhipster
directoryJDL entity definitions
Congratulations, JHipster execution is complete!
If you find JHipster useful consider sponsoring the project https://www.jhipster.tech/sponsors/
Thanks for using JHipster!
Related issues
After searching the issues, I did not find an exact match for this problem, but it appears to be a potential regression or unintended behavior introduced in version 8.6.
Suggest a Fix
The issue likely stems from how JHipster handles enum types during the generation of entity classes, particularly in the setter methods. A potential fix could involve reviewing and adjusting the handling of enum properties in the generated code.
JHipster Version(s)
The issue occurs in JHipster version 8.6 with java 21
Browsers and Operating System
Operating System: MacOS
Browser: Not applicable (Issue occurs server-side)
The text was updated successfully, but these errors were encountered: