File tree Expand file tree Collapse file tree 1 file changed +2
-6
lines changed
src/main/java/com/example/log4u/domain/media/repository Expand file tree Collapse file tree 1 file changed +2
-6
lines changed Original file line number Diff line number Diff line change 44
55import org .springframework .data .jpa .repository .JpaRepository ;
66import org .springframework .data .jpa .repository .Modifying ;
7- import org .springframework .data .jpa .repository .Query ;
8- import org .springframework .data .repository .query .Param ;
97
108import com .example .log4u .domain .media .entity .Media ;
119
1210public interface MediaRepository extends JpaRepository <Media , Long > {
1311
1412 @ Modifying
15- @ Query ("DELETE FROM Media m WHERE m.diaryId = :diaryId" )
16- void deleteByDiaryId (@ Param ("diaryId" ) Long diaryId );
13+ void deleteByDiaryId (Long diaryId );
1714
1815 List <Media > findByDiaryId (Long diaryId );
1916
20- @ Query ("SELECT m FROM Media m WHERE m.diaryId IN :diaryIds" )
21- List <Media > findByDiaryIdIn (@ Param ("diaryIds" ) List <Long > diaryIds );
17+ List <Media > findByDiaryIdIn (List <Long > diaryIds );
2218}
You can’t perform that action at this time.
0 commit comments