質問編集履歴
7
追加
test
CHANGED
@@ -1 +1 @@
|
|
1
|
-
List Pageの違い ページング JPQL sql java
|
1
|
+
List Pageの違い ページング JPQL sql java spring JPA
|
test
CHANGED
File without changes
|
6
追加
test
CHANGED
@@ -1 +1 @@
|
|
1
|
-
List Pageの違い ページング JPQL
|
1
|
+
List Pageの違い ページング JPQL sql java
|
test
CHANGED
File without changes
|
5
追加
test
CHANGED
@@ -1 +1 @@
|
|
1
|
-
List Pageの違い
|
1
|
+
List Pageの違い ページング JPQL
|
test
CHANGED
File without changes
|
4
修正
test
CHANGED
File without changes
|
test
CHANGED
@@ -34,6 +34,16 @@
|
|
34
34
|
|
35
35
|
|
36
36
|
|
37
|
+
エラー
|
38
|
+
|
39
|
+
```
|
40
|
+
|
41
|
+
|
42
|
+
|
43
|
+
Caused by: org.springframework.data.jpa.repository.query.InvalidJpaQueryMethodException: Cannot use native queries with dynamic sorting and/or pagination in method public abstract org.springframework.data.domain.Page com.example.konkatsu.repository.ProfileRepository.findFavoriteByUserId(java.lang.Integer,org.springframework.data.domain.Pageable)
|
44
|
+
|
45
|
+
```
|
46
|
+
|
37
47
|
Pageableを使用するときは
|
38
48
|
|
39
49
|
nativeQuery だと適応されないのでしょうか???
|
3
修正
test
CHANGED
File without changes
|
test
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
@Query(value = "SELECT * FROM PROFILE INNER JOIN FAVORITE ON PROFILE.USER_ID = FAVORITE.FAVORITE_USER_ID WHERE FAVORITE.USER_ID = ? ", nativeQuery = true)
|
4
4
|
|
5
|
-
List<Profile> findFavorite
|
5
|
+
List<Profile> findFavoriteByUserId(Integer userId);
|
6
6
|
|
7
7
|
```
|
8
8
|
|
@@ -28,7 +28,7 @@
|
|
28
28
|
|
29
29
|
@Query(value = "SELECT * FROM PROFILE INNER JOIN FAVORITE ON PROFILE.USER_ID = FAVORITE.FAVORITE_USER_ID WHERE FAVORITE.USER_ID = ? ", nativeQuery = true)
|
30
30
|
|
31
|
-
Page<Profile> findFavorite
|
31
|
+
Page<Profile> findFavoriteByUserId(Integer userId, Pageable pageable);
|
32
32
|
|
33
33
|
```
|
34
34
|
|
2
修正
test
CHANGED
File without changes
|
test
CHANGED
@@ -26,7 +26,7 @@
|
|
26
26
|
|
27
27
|
```java
|
28
28
|
|
29
|
-
@Query(value = "SELECT * FROM PROFILE INNER JOIN FAVORITE ON PROFILE.USER_ID = FAVORITE.FAVORITE_USER_ID WHERE FAVORITE.USER_ID = ?
|
29
|
+
@Query(value = "SELECT * FROM PROFILE INNER JOIN FAVORITE ON PROFILE.USER_ID = FAVORITE.FAVORITE_USER_ID WHERE FAVORITE.USER_ID = ? ", nativeQuery = true)
|
30
30
|
|
31
31
|
Page<Profile> findFavoriteUserIdByUserId(Integer userId, Pageable pageable);
|
32
32
|
|
1
修正
test
CHANGED
File without changes
|
test
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
@Query(value = "SELECT * FROM PROFILE INNER JOIN FAVORITE ON PROFILE.USER_ID = FAVORITE.FAVORITE_USER_ID WHERE FAVORITE.USER_ID = ? ", nativeQuery = true)
|
4
4
|
|
5
|
-
|
5
|
+
List<Profile> findFavoriteUserIdByUserId(Integer userId);
|
6
6
|
|
7
7
|
```
|
8
8
|
|