質問編集履歴

4

説明分の編集

2019/11/06 15:48

投稿

icezoom
icezoom

スコア36

test CHANGED
File without changes
test CHANGED
@@ -48,17 +48,11 @@
48
48
 
49
49
  { title: 'メールアドレス', data: 'email' },
50
50
 
51
- { title: '都道府県', data: 'prefNm' },
51
+
52
-
53
- { title: '市区町村', data: 'cityNm' },
54
52
 
55
53
  ],
56
54
 
57
- {
55
+
58
-
59
- select: 'single'
60
-
61
- }
62
56
 
63
57
  );
64
58
 

3

説明文の修正

2019/11/06 15:48

投稿

icezoom
icezoom

スコア36

test CHANGED
File without changes
test CHANGED
@@ -16,7 +16,7 @@
16
16
 
17
17
 
18
18
 
19
- DataTables warning: table id=datatable - Requested unknown parameter 'prefNm' for row 0, column 5. For more information about this error, please see http://datatables.net/tn/4
19
+ DataTables warning: table id=datatable - Requested unknown parameter 'nm' for row 0, column 5. For more information about this error, please see http://datatables.net/tn/4
20
20
 
21
21
 
22
22
 
@@ -34,15 +34,15 @@
34
34
 
35
35
 
36
36
 
37
- var ds = RIF.getDatatablesSetting('#datatable', '/owner/search',
37
+ var ds = RIF.getDatatablesSetting('#datatable', '/user/search',
38
38
 
39
39
  [
40
40
 
41
- { title: '', data: 'ownerId', type: 'chk' },
41
+ { title: '', data: 'Id', type: 'chk' },
42
42
 
43
- { title: '大家名', data: 'ownerNm' },
43
+ { title: '名', data: 'nm' },
44
44
 
45
- { title: '大家カナ', data: 'ownerKn' },
45
+ { title: 'カナ', data: 'kn' },
46
46
 
47
47
  { title: '電話番号', data: 'tel' },
48
48
 

2

説明文の修正

2019/10/31 07:28

投稿

icezoom
icezoom

スコア36

test CHANGED
File without changes
test CHANGED
@@ -26,171 +26,7 @@
26
26
 
27
27
 
28
28
 
29
- ```java
30
29
 
31
- @Entity
32
-
33
- @Table(name = "m_owner")
34
-
35
- @Data
36
-
37
- public class MOwner {
38
-
39
-
40
-
41
- @Id
42
-
43
- @GeneratedValue(strategy = GenerationType.IDENTITY)
44
-
45
- private Long ownerId;
46
-
47
-
48
-
49
- private String ownerNm;
50
-
51
-
52
-
53
- private String ownerKn;
54
-
55
-
56
-
57
- private String tel;
58
-
59
-
60
-
61
- private String email;
62
-
63
-
64
-
65
- // TODO 外部キー
66
-
67
- private Long prefId;
68
-
69
-
70
-
71
- // TODO 外部キー
72
-
73
- private Long cityId;
74
-
75
-
76
-
77
- // 住所(町域以下)
78
-
79
- private String address;
80
-
81
-
82
-
83
- // 備考
84
-
85
- private String remarks;
86
-
87
-
88
-
89
- // 最終更新日時
90
-
91
- private LocalDateTime lastModified;
92
-
93
-
94
-
95
- @ManyToOne
96
-
97
- @JoinColumn(name = "prefId", insertable = false, updatable = false)
98
-
99
- private MPref mPref;
100
-
101
- }
102
-
103
- ```
104
-
105
- ```java
106
-
107
- @Entity
108
-
109
- @Table(name = "m_pref")
110
-
111
- @Data
112
-
113
- public class MPref {
114
-
115
-
116
-
117
- // 都道府県ID
118
-
119
- @Id
120
-
121
- @GeneratedValue(strategy = GenerationType.IDENTITY)
122
-
123
- private Long prefId;
124
-
125
-
126
-
127
- // 都道府県名
128
-
129
- private String prefNm;
130
-
131
-
132
-
133
- // 表示順
134
-
135
- private Integer sort;
136
-
137
-
138
-
139
- // 最終更新日時
140
-
141
- private LocalDateTime lastModified;
142
-
143
-
144
-
145
- }
146
-
147
-
148
-
149
- ```
150
-
151
-
152
-
153
- ```
154
-
155
- @Repository
156
-
157
- public interface MOwnerRepository extends JpaRepository<MOwner, Long> {
158
-
159
-
160
-
161
- @Query("SELECT o FROM MOwner o INNER JOIN o.mPref p ")
162
-
163
- public List<MOwner> findList();
164
-
165
- }
166
-
167
- ```
168
-
169
- ```java (service)
170
-
171
- public List<MOwner> search(){
172
-
173
- return mOwnerRepository.findList();
174
-
175
- }
176
-
177
- ```
178
-
179
-
180
-
181
- ```java(controller)
182
-
183
- @RequestMapping(path = "search", method = RequestMethod.GET)
184
-
185
- public String search(Model model) {
186
-
187
-
188
-
189
- return JsonUtil.convSearchData(service.search());
190
-
191
- }
192
-
193
- ```
194
30
 
195
31
  ```jquery
196
32
 

1

タイトル変更

2019/10/31 07:25

投稿

icezoom
icezoom

スコア36

test CHANGED
@@ -1 +1 @@
1
- spring boot jpa @many to one
1
+ jQuery データテーブルエラー
test CHANGED
File without changes