teratail header banner
teratail header banner
質問するログイン新規登録

質問編集履歴

4

データベースを追加

2023/06/30 11:41

投稿

Atsugi
Atsugi

スコア4

title CHANGED
File without changes
body CHANGED
@@ -11,6 +11,8 @@
11
11
  ![イメージ説明](https://ddjkaamml8q8x.cloudfront.net/questions/2023-06-30/1cda5e28-db69-4f5b-8a9f-3ed9c879c70c.png)
12
12
  ![イメージ説明](https://ddjkaamml8q8x.cloudfront.net/questions/2023-06-30/1b702e0f-3605-40c1-bd8a-532937086901.png)
13
13
 
14
+ database
15
+ ![イメージ説明](https://ddjkaamml8q8x.cloudfront.net/questions/2023-06-30/b0c97894-73e3-4cb3-bd36-532ac2a9ac5a.png)
14
16
  ### 発生している問題・エラーメッセージ
15
17
 
16
18
  ```

3

ご指摘に従い変更

2023/06/30 11:32

投稿

Atsugi
Atsugi

スコア4

title CHANGED
File without changes
body CHANGED
@@ -14,20 +14,18 @@
14
14
  ### 発生している問題・エラーメッセージ
15
15
 
16
16
  ```
17
- 2023-06-30T19:59:20.006+09:00 ERROR 29100 --- [nio-8080-exec-4] o.a.c.c.C.[.[.[/].[dispatcherServlet] : Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed: org.springframework.jdbc.BadSqlGrammarException:
18
- ### Error updating database. Cause: org.postgresql.util.PSQLException: ERROR: "done_flg"またはその近辺で構文エラー
19
- 位置: 98
17
+ 2023-06-30T20:30:17.196+09:00 ERROR 25012 --- [nio-8080-exec-8] o.a.c.c.C.[.[.[/].[dispatcherServlet] : Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed: org.springframework.jdbc.BadSqlGrammarException:
18
+ ### Error updating database. Cause: org.postgresql.util.PSQLException: ERROR: "where"またはその近辺で構文エラー
19
+ 位置: 119
20
20
  ### The error may exist in com/example/todoapp/mapper/TodoMapper.xml
21
21
  ### The error may involve com.example.todoapp.mapper.TodoMapper.update-Inline
22
22
  ### The error occurred while setting parameters
23
- ### SQL: update todo_items set title = ?, time_limit = to_date(?,'yy-mm-dd') done_flg = ? where id = ?
23
+ ### SQL: update todo_items set title = ?, time_limit = to_date(?,'yy-mm-dd'), done_flg = ?, where id = ?
24
- ### Cause: org.postgresql.util.PSQLException: ERROR: "done_flg"またはその近辺で構文エラー
24
+ ### Cause: org.postgresql.util.PSQLException: ERROR: "where"またはその近辺で構文エラー
25
- 位置: 98
25
+ 位置: 119
26
26
  ; bad SQL grammar []] with root cause
27
27
 
28
- org.postgresql.util.PSQLException: ERROR: "done_flg"またはその近辺で構文エラー
28
+ org.postgresql.util.PSQLException: ERROR: "where"またはその近辺で構文エラー
29
- 位置: 98
30
- at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2713) ~[postgresql-42.6.0.jar:42.6.0]
31
29
  ```
32
30
 
33
31
  ### 該当のソースコード
@@ -173,7 +171,7 @@
173
171
  update todo_items set
174
172
  title = #{title},
175
173
  time_limit = to_date(#{time_limit},'yy-mm-dd'),
176
- done_flg = #{done_flg}
174
+ done_flg = #{done_flg},
177
175
  where id = #{id}
178
176
  </update>
179
177
  </mapper>

2

画像の追加

2023/06/30 11:13

投稿

Atsugi
Atsugi

スコア4

title CHANGED
File without changes
body CHANGED
@@ -9,6 +9,7 @@
9
9
  完了のチェックボックスにチェックを入れて
10
10
  更新を押すとうまく更新がされません。
11
11
  ![イメージ説明](https://ddjkaamml8q8x.cloudfront.net/questions/2023-06-30/1cda5e28-db69-4f5b-8a9f-3ed9c879c70c.png)
12
+ ![イメージ説明](https://ddjkaamml8q8x.cloudfront.net/questions/2023-06-30/1b702e0f-3605-40c1-bd8a-532937086901.png)
12
13
 
13
14
  ### 発生している問題・エラーメッセージ
14
15
 

1

画像の追加

2023/06/30 11:01

投稿

Atsugi
Atsugi

スコア4

title CHANGED
File without changes
body CHANGED
@@ -8,6 +8,7 @@
8
8
  Springbootでtodoアプリを作ろうとしています。
9
9
  完了のチェックボックスにチェックを入れて
10
10
  更新を押すとうまく更新がされません。
11
+ ![イメージ説明](https://ddjkaamml8q8x.cloudfront.net/questions/2023-06-30/1cda5e28-db69-4f5b-8a9f-3ed9c879c70c.png)
11
12
 
12
13
  ### 発生している問題・エラーメッセージ
13
14