-
Notifications
You must be signed in to change notification settings - Fork 303
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
Development
: Add dynamic fetches to simplify complexity in repositories
#8607
Conversation
Development
: Add dynamic fetchesDevelopment
: Add dynamic fetches to simplify complexity in repositories
Looks great so far, I fully support this idea. I think it would be even more ergonomic for the developer if the fetch options could be provided as varargs as well as/instead of inside a collection. I think most of the time these fetch options are going to be specified inline in the method arguments, and requiring a collection would mean that you have to wrap them in |
Thanks for the positive feedback 👍 I actually had a varargs version as well :-) but it was unused, so I decided to delete it again before pushing the code. We can definitely add one and support the "empty" fetch as well. I re-added the varargs version in my latest commit |
...va/de/tum/in/www1/artemis/repository/SolutionProgrammingExerciseParticipationRepository.java
Outdated
Show resolved
Hide resolved
src/main/java/de/tum/in/www1/artemis/repository/ProgrammingExerciseRepository.java
Outdated
Show resolved
Hide resolved
src/main/java/de/tum/in/www1/artemis/repository/SolutionParticipationFetchOptions.java
Outdated
Show resolved
Hide resolved
...va/de/tum/in/www1/artemis/repository/TemplateProgrammingExerciseParticipationRepository.java
Outdated
Show resolved
Hide resolved
src/main/java/de/tum/in/www1/artemis/repository/TemplateParticipationFetchOptions.java
Outdated
Show resolved
Hide resolved
There hasn't been any activity on this pull request recently. Therefore, this pull request has been automatically marked as stale and will be closed if no further activity occurs within seven days. Thank you for your contributions. |
There hasn't been any activity on this pull request recently. Therefore, this pull request has been automatically marked as stale and will be closed if no further activity occurs within seven days. Thank you for your contributions. |
# Conflicts: # src/main/java/de/tum/in/www1/artemis/repository/RepositoryImpl.java
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.
I think you missed the usage of generics for the IDs:
src/main/java/de/tum/in/www1/artemis/repository/base/DynamicSpecificationRepository.java
Outdated
Show resolved
Hide resolved
src/main/java/de/tum/in/www1/artemis/repository/base/DynamicSpecificationRepository.java
Outdated
Show resolved
Hide resolved
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.
Actionable comments posted: 2
src/main/java/de/tum/in/www1/artemis/repository/base/DynamicSpecificationRepository.java
Show resolved
Hide resolved
src/main/java/de/tum/in/www1/artemis/repository/base/DynamicSpecificationRepository.java
Show resolved
Hide resolved
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.
Code
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.
Code looks good 👍
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.
tested on ts4, the programming exercise details page appears as is does on develop
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.
Tested on TS4 Instructor Prog. Exercise View has no issues
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.
👍🏽
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.
Tested on ts4. Detail page of programming exercise works as expected
Checklist
General
Server
Changes affecting Programming Exercises
Motivation and Context
Currently we have some repositories that use a lot of different methods to fetch an entity by an ID while eagerly fetching different relationships.
This leads to needlessly large repositories.
Description
To address this issue we add a new mechanism to eagerly fetch relationships using specifications.
You can read the new documentation section for details, but effectively it does this:
Steps for Testing
Prerequisites:
Testserver States
Note
These badges show the state of the test servers.
Green = Currently available, Red = Currently locked
Review Progress
Performance Review
Code Review
Manual Tests
Test Coverage
Summary by CodeRabbit
New Features
Documentation