Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
PA165 Formula One Team
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Diana Gulčíková
PA165 Formula One Team
Commits
e9ba03dc
There was an error fetching the commit references. Please try again later.
Commit
e9ba03dc
authored
2 years ago
by
Diana Gulčíková
Browse files
Options
Downloads
Patches
Plain Diff
wip
parent
f1cc08be
No related branches found
No related tags found
2 merge requests
!60
Docker
,
!33
17 statistics endpoint
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
race/src/main/java/cz/muni/pa165/race/data/repository/RaceRepository.java
+11
-1
11 additions, 1 deletion
...va/cz/muni/pa165/race/data/repository/RaceRepository.java
with
11 additions
and
1 deletion
race/src/main/java/cz/muni/pa165/race/data/repository/RaceRepository.java
+
11
−
1
View file @
e9ba03dc
package
cz.muni.pa165.race.data.repository
;
import
cz.muni.pa165.common_library.racecomponents.Location
;
import
cz.muni.pa165.common_library.racecomponents.Race
;
import
java.util.List
;
import
org.springframework.data.jpa.repository.JpaRepository
;
import
org.springframework.data.jpa.repository.Query
;
import
org.springframework.data.repository.query.Param
;
import
org.springframework.stereotype.Repository
;
/**
* Race repository.
*/
@Repository
// TODO queries na assignovanie driverov
public
interface
RaceRepository
extends
JpaRepository
<
Race
,
Long
>
{
@Query
(
"SELECT r FROM Race r"
+
" JOIN r.raceInfo ri "
+
" JOIN r.driver1 do "
+
" JOIN r.driver2 dt "
+
"WHERE ri.location = :location AND (do.id = :driverId OR dt.id = :driverId)"
)
List
<
Race
>
findAllRacesOfDriverInLocation
(
@Param
(
"location"
)
Location
raceLocation
,
@Param
(
"driverId"
)
long
driverId
);
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment