質問編集履歴

3

datrabaseの問題という推測

2021/01/25 01:49

投稿

t.ooishi
t.ooishi

スコア2

test CHANGED
File without changes
test CHANGED
@@ -222,20 +222,34 @@
222
222
 
223
223
 
224
224
 
225
- public static void main(String[] args) {
225
+ package com.example.hajibootjpa.repository;
226
-
226
+
227
+
228
+
227
- SpringApplication.run(HajibootJpaApplication.class, args);
229
+ import com.example.hajibootjpa.domain.Customer;
230
+
228
-
231
+ import org.springframework.data.domain.Page;
232
+
229
-
233
+ import org.springframework.data.domain.Pageable;
234
+
230
-
235
+ import org.springframework.data.jpa.repository.Query;
236
+
237
+ import org.springframework.data.jpa.repository.JpaRepository;
238
+
239
+
240
+
241
+ public interface CustomerRepository extends JpaRepository <Customer,
242
+
231
- }
243
+ Integer> {
244
+
245
+ @Query("SELECT X FROM Customer X ORDER BY X.firstName, X.lastName")
246
+
247
+ Page<Customer> findAllOrderByName(Pageable pageable);
232
248
 
233
249
  }
234
250
 
235
251
 
236
252
 
237
-
238
-
239
253
  ```
240
254
 
241
255
 
@@ -398,9 +412,13 @@
398
412
 
399
413
  ### 試したこと
400
414
 
401
-
402
-
403
- ここ問題に対し試したことを載してください
415
+ H2というデーターベースで「drop」が実行される。エラーつい参照
416
+
417
+ 2021-01-25 10:47:27.866 INFO 3380 --- [ Thread-2] jdbc.sqlonly : drop table customers if exists
418
+
419
+ 2021-01-25 10:47:27.869 INFO 3380 --- [ Thread-2] jdbc.sqltiming : drop table customers if exists {executed in 3 msec}
420
+
421
+
404
422
 
405
423
 
406
424
 

2

2021/01/25 01:49

投稿

t.ooishi
t.ooishi

スコア2

test CHANGED
File without changes
test CHANGED
@@ -2,9 +2,7 @@
2
2
 
3
3
 
4
4
 
5
- JavaでSpringbootを使って、postrgreSQLのID管理のシステムを作っています。
5
+ JavaでSpringbootを使って、postrgreSQLのID管理のシステムを作っています。テーブルに列を追加して、id,first_name,last_nameのカラムに情報いれるという機能を実装中に以下のエラーメッセージが発生しました。
6
-
7
- IDを追加して、テーブルを増やす機能を実装中に以下のエラーメッセージが発生しました。
8
6
 
9
7
 
10
8
 

1

2021/01/17 13:21

投稿

t.ooishi
t.ooishi

スコア2

test CHANGED
@@ -1 +1 @@
1
- Spring boot のエラー(JPA
1
+ Spring boot のエラー(JPA
test CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
 
4
4
 
5
- JavaでSpringbootを使って、postrageSQLのID管理のシステムを作っています。
5
+ JavaでSpringbootを使って、postrgreSQLのID管理のシステムを作っています。
6
6
 
7
7
  IDを追加して、テーブルを増やす機能を実装中に以下のエラーメッセージが発生しました。
8
8