回答編集履歴

2

完成版

2020/04/25 14:21

投稿

退会済みユーザー
test CHANGED
@@ -22,9 +22,19 @@
22
22
 
23
23
  hibernate:
24
24
 
25
+ ddl-auto: validate
26
+
25
27
  naming:
26
28
 
27
- physical-strategy: org.hibernate.boot.model.naming.PhysicalNamingStrategyStandardImpl
29
+ physical-strategy: org.hibernate.boot.model.naming.PhysicalNamingStrategyStandardImpl
30
+
31
+ properties:
32
+
33
+ hibernate:
34
+
35
+ globally_quoted_identifiers: true
36
+
37
+
28
38
 
29
39
 
30
40
 
@@ -96,13 +106,13 @@
96
106
 
97
107
  @Data
98
108
 
99
- @Table(name = "`users`", indexes = { //
109
+ @Table(name = "users", indexes = { //
100
110
 
101
- @Index(columnList = "username, deleted", unique = true), //
111
+ @Index(columnList = "USERNAME, DELETED", unique = true), //
102
112
 
103
- @Index(columnList = "username, deleted", unique = true), //
113
+ @Index(columnList = "USERNAME, DELETED", unique = true), //
104
114
 
105
- }, schema = "`ORAUSER`")
115
+ }, schema = "ORAUSER")
106
116
 
107
117
  @Entity
108
118
 
@@ -162,6 +172,8 @@
162
172
 
163
173
  }
164
174
 
175
+
176
+
165
177
  ```
166
178
 
167
179
 

1

修正

2020/04/25 14:21

投稿

退会済みユーザー
test CHANGED
@@ -1,9 +1,3 @@
1
- とりあえず確認してみたが、テーブル作成してなかったんだろうね。
2
-
3
-
4
-
5
-
6
-
7
1
  # application.yml
8
2
 
9
3
 
@@ -20,6 +14,20 @@
20
14
 
21
15
  password: orauser
22
16
 
17
+
18
+
19
+ jpa:
20
+
21
+ show-sql: true
22
+
23
+ hibernate:
24
+
25
+ naming:
26
+
27
+ physical-strategy: org.hibernate.boot.model.naming.PhysicalNamingStrategyStandardImpl
28
+
29
+
30
+
23
31
  ```
24
32
 
25
33
 
@@ -30,7 +38,7 @@
30
38
 
31
39
  ```sql
32
40
 
33
- CREATE TABLE users (
41
+ CREATE TABLE "ORAUSER"."users" (
34
42
 
35
43
  id number primary key,
36
44
 
@@ -88,13 +96,13 @@
88
96
 
89
97
  @Data
90
98
 
91
- @Table(name = "users", indexes = { //
99
+ @Table(name = "`users`", indexes = { //
92
100
 
93
101
  @Index(columnList = "username, deleted", unique = true), //
94
102
 
95
103
  @Index(columnList = "username, deleted", unique = true), //
96
104
 
97
- })
105
+ }, schema = "`ORAUSER`")
98
106
 
99
107
  @Entity
100
108
 
@@ -104,31 +112,31 @@
104
112
 
105
113
  @Id
106
114
 
107
- @Column(nullable = false)
115
+ @Column(name = "ID", nullable = false)
108
116
 
109
117
  Long id;
110
118
 
111
119
 
112
120
 
113
- @Column(nullable = false)
121
+ @Column(name = "USERNAME", nullable = false)
114
122
 
115
123
  String username;
116
124
 
117
125
 
118
126
 
119
- @Column(nullable = false)
127
+ @Column(name = "EMAIL", nullable = false)
120
128
 
121
129
  String email;
122
130
 
123
131
 
124
132
 
125
- @Column(nullable = false)
133
+ @Column(name = "PASSWORD", nullable = false)
126
134
 
127
135
  String password;
128
136
 
129
137
 
130
138
 
131
- @Column(nullable = false)
139
+ @Column(name = "CREATED", nullable = false)
132
140
 
133
141
  @Convert(converter = LocalDateTimeConverter.class)
134
142
 
@@ -136,7 +144,7 @@
136
144
 
137
145
 
138
146
 
139
- @Column(nullable = false)
147
+ @Column(name = "UPDATED", nullable = false)
140
148
 
141
149
  @Convert(converter = LocalDateTimeConverter.class)
142
150
 
@@ -144,7 +152,7 @@
144
152
 
145
153
 
146
154
 
147
- @Column(nullable = true)
155
+ @Column(name = "DELETED", nullable = true)
148
156
 
149
157
  @Convert(converter = LocalDateTimeConverter.class)
150
158
 
@@ -154,12 +162,8 @@
154
162
 
155
163
  }
156
164
 
157
-
158
-
159
165
  ```
160
166
 
161
167
 
162
168
 
163
- 結果正常
164
-
165
- なのでおそらく権限がな本当ない
169
+ 前提間違えてた。。 設定がありそう