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

isPersisted ends up in elasticsearch index #27686

Open
1 task done
OmarHawk opened this issue Oct 25, 2024 · 0 comments
Open
1 task done

isPersisted ends up in elasticsearch index #27686

OmarHawk opened this issue Oct 25, 2024 · 0 comments

Comments

@OmarHawk
Copy link
Contributor

Overview of the issue

Currently, when using elasticsearch as part of your application, the generated application does not only save actual payload fields into the corresponding index, but also fields like isPersisted. This is, because when generating this field, it is annotated with @Transient (jakarta.persistence.Transient) but not with @org.springframework.data.annotation.Transient.

Motivation for or Use Case

As this field isPersistedis useless information for an elasticsearch index, we should also just generate the other Transient annotation as well.

Reproduce the error

https://github.com/jhipster/generator-jhipster/blob/89f377426892a987ab410687d121122a4950e17b/generators/spring-data-relational/templates/src/main/java/_package_/_entityPackage_/domain/_persistClass_.java.jhi.spring_data_persistable.ejs#L38C18-L41

This is the place, where this field is currently generated. The second annotation is nowhere else to be found, but should be somewhere...

Related issues
Suggest a Fix
JHipster Version(s)

8.7.1

JHipster configuration

To provide all information we need, you should run jhipster info in the project root folder (or workspaces root for microservices), and
copy/paste the result here.
jhipster info removes sentitive information like rememberKey, jwtSecretKey. Double check if there is any other sensitive info.

As alternative you can add a JDL wrapped in below structure

JDL definitions
     JDL content here
  

The information is mandatory for bug reports. This will allow us to use automated tests and genarate the broken sample using jhipster from-issue command.

Browsers and Operating System
  • Checking this box is mandatory (this is just to show you read everything)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant