-
Notifications
You must be signed in to change notification settings - Fork 0
Before node build, dont load excluded, inactive or stashed modifications #710
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
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: David BRAQUART <[email protected]>
6e87cd1 to
f1a2189
Compare
…odifications-we-wont-build # Conflicts: # src/main/java/org/gridsuite/modification/server/repositories/NetworkModificationRepository.java
Signed-off-by: David BRAQUART <[email protected]>
f0bc16e to
42a8cdc
Compare
|
TheMaskedTurtle
left a comment
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.
Be careful with the word 'active' because there are already methods that are named 'active' but it fetches only unstashed modifications... and not unstashed and active... which can be confusing. So either remane these other methods or maybe rename yours. Even if yours is correctly named ^^
| List<ModificationEntity> modificationsEntities = getModificationEntityStream(groupUuid) | ||
| .filter(m -> modificationsToExclude == null || !modificationsToExclude.contains(m.getId())) | ||
| .filter(m -> !m.getStashed() && m.getActivated()) | ||
| .toList(); |
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.
It would be even better to do that in SQL directly. So we don't load unnecessary entities in JPA.
| .stream() | ||
| .filter(m -> modificationsToExclude == null || !modificationsToExclude.contains(m.getId())) | ||
| .filter(m -> !m.getStashed()) | ||
| .toList(); |
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.
You can remove .stream().toList();
|
Now |



No description provided.