Skip to content

Commit

Permalink
Refactor : left outer join으로 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
Kim-Dong-Jun99 committed Jan 18, 2024
1 parent c85e07d commit b7a81d4
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,6 @@ public interface TripRepository extends JpaRepository<Trip, Long> {
@Query("SELECT t FROM Trip t JOIN FETCH t.tripItems WHERE t.id = :tripId")
Optional<Trip> findTripByTripId(@Param("tripId") Long tripId);
@Lock(PESSIMISTIC_WRITE)
@Query("SELECT t FROM Trip t JOIN FETCH t.tripItems WHERE t.id = :tripId")
@Query("SELECT t FROM Trip t LEFT OUTER JOIN FETCH t.tripItems WHERE t.id = :tripId")
Optional<Trip> findTripForUpdate(@Param("tripId") Long tripId);
}

0 comments on commit b7a81d4

Please sign in to comment.