-
-
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
Persistence improvements using hypersistence optimizer #10667
Conversation
For OneToOne, if MapsId is not used then on one side of the relationship (side without foreign key) will always be eager fetched, even if you put Lazy. |
@Blackdread Yes you are correct. If it is bidirectional then there will be no effect. But for unidirectional, this will work. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Thanks @DanielFran! |
There's a problem here : if we set the fetch strategy to be lazy at hibernate level, then it should be done at controller or service level. With the new behavior, if you call the REST endpoint for an entity, you don't see the related entity in the endpoint (it's |
Thanks @cbornet for describing the problem. Actually yes, I generated and tested the PR by skipping the client during generation. I will check it. |
For the moment, I will revert the lazy load. It is better to have a patch release for this. |
Fixes #10650
Fixes #10653
Please note that all are verified using the
prod
profile only.Postgresql
Mysql
Mariadb
Mssql
Oracle
Please make sure the below checklist is followed for Pull Requests.
Travis tests are green
Tests are added where necessary
Documentation is added/updated where necessary
Coding Rules & Commit Guidelines as per our CONTRIBUTING.md document are followed