Skip to content

Commit

Permalink
perf: claire's review
Browse files Browse the repository at this point in the history
  • Loading branch information
maximeperrault authored and maximeperraultdev committed Sep 3, 2024
1 parent 460757e commit a35e642
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,9 @@ interface IDBMissionRepository : JpaRepository<MissionModel, Int> {
fun findNotDeletedByIds(ids: List<Int>): List<MissionModel>

@EntityGraph(value = "MissionModel.fullLoad", type = EntityGraph.EntityGraphType.LOAD)
@Query("SELECT mission FROM MissionModel mission JOIN mission.controlUnits missionControlUnitResources WHERE missionControlUnitResources.unit.id = :controlUnitId")
@Query(
"SELECT mission FROM MissionModel mission JOIN mission.controlUnits missionControlUnitResources WHERE missionControlUnitResources.unit.id = :controlUnitId",
)
fun findByControlUnitId(controlUnitId: Int): List<MissionModel>

@EntityGraph(value = "MissionModel.fullLoad", type = EntityGraph.EntityGraphType.LOAD)
Expand Down

0 comments on commit a35e642

Please sign in to comment.