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

Fix orderBy for cached many requests - v2 #3486

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

nPraml
Copy link
Contributor

@nPraml nPraml commented Oct 1, 2024

Hello @rbygrave,

this is the refactored solution, the easy one is in #3485

Please take a look and give us feedback.

Cheers
Noemi

@rPraml FYI

} else {
query.select(many.targetIdProperty());
}
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CHECKME: Is ist ok, if the onlyIds code path is in newLoadManyQuery or may there be cases, where configureQuery overwrites the select?

query.where().idEq(parentId);
query.setBeanCacheMode(CacheMode.OFF);
query.setMode(Mode.LAZYLOAD_MANY);
query.setLazyLoadManyPath(many.name());
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CHECKME: what do we need here?

@rPraml
Copy link
Contributor

rPraml commented Oct 1, 2024

Would be good if we have some feedback from Rob, because I am unsure about the change ;)

@rbygrave
Copy link
Member

rbygrave commented Oct 8, 2024

Hmmm, when we say "refactored solution" it can mean different things to different people. Generally a code reviewer wants to know what code was changed and why, and what code was simply moved but not actually changed [and maybe why it was moved / why include it in the PR?]. Looking to distill the "changes to the logic" and confirm there were no "Accidental changes" or "Changes with unknown impacts". The easiest PRs only change what they absolutely need to and nothing more.

In this PR I see some changes that don't look the same but I don't know if that was actually the intention or something else?

Can you state what the changes here are and why they were maed? For example, why change findOne into findList? Why was that done etc.

You can do this by putting your own comments into the PR - 1 per change. Like "This code was moved over to other location with no other changes", "findOne changed to findList because ...". Add those comments in and then I can review this again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants