File tree Expand file tree Collapse file tree 2 files changed +38
-16
lines changed
tooling/metamodel-generator/src
jakartaData/java/org/hibernate/processor/test/data/reactive
main/java/org/hibernate/processor/annotation Expand file tree Collapse file tree 2 files changed +38
-16
lines changed Original file line number Diff line number Diff line change @@ -91,6 +91,9 @@ record BookWithAuthor(Book book, Author author) {}
91
91
@ Insert
92
92
Uni <Publisher []> insertAll (Publisher [] publishers );
93
93
94
+ @ Delete
95
+ Uni <Void > deleteAll (List <Publisher > publishers );
96
+
94
97
@ Save
95
98
Uni <Publisher > save (Publisher publisher );
96
99
Original file line number Diff line number Diff line change @@ -141,7 +141,7 @@ private void delegateBlockingly(StringBuilder declaration) {
141
141
.append (sessionName )
142
142
.append ('.' )
143
143
.append ("insert" );
144
- argument ( declaration , "Multiple" );
144
+ argument ( declaration );
145
145
declaration
146
146
.append (";\n " )
147
147
.append ("\t \t else\n \t " );
@@ -151,28 +151,47 @@ private void delegateBlockingly(StringBuilder declaration) {
151
151
.append (sessionName )
152
152
.append ('.' )
153
153
.append (operationName );
154
- argument ( declaration , "Multiple" );
154
+ argument ( declaration );
155
155
declaration
156
156
.append (";\n " );
157
157
}
158
158
159
- private void argument (StringBuilder declaration , String suffix ) {
159
+ private void argument (StringBuilder declaration ) {
160
160
switch ( parameterKind ) {
161
161
case LIST :
162
- declaration
163
- .append (suffix )
164
- .append ("(" )
165
- .append (parameterName )
166
- .append (")" );
162
+ if ( isReactive () ) {
163
+ declaration
164
+ .append ("All" )
165
+ .append ("(" )
166
+ .append (parameterName )
167
+ .append (".toArray()" )
168
+ .append ( ")" );
169
+ }
170
+ else {
171
+ declaration
172
+ .append ("Multiple" )
173
+ .append ("(" )
174
+ .append (parameterName )
175
+ .append (")" );
176
+ }
167
177
break ;
168
178
case ARRAY :
169
- declaration
170
- .append (suffix )
171
- .append ("(" )
172
- .append (annotationMetaEntity .importType (LIST ))
173
- .append (".of(" )
174
- .append (parameterName )
175
- .append ("))" );
179
+ if ( isReactive () ) {
180
+ declaration
181
+ .append ("All" )
182
+ .append ("(" )
183
+ .append (parameterName )
184
+ .append (")" );
185
+ }
186
+ else {
187
+ declaration
188
+ .append ("Multiple" )
189
+ .append ("(" )
190
+ .append (annotationMetaEntity .importType (LIST ))
191
+ .append (".of(" )
192
+ .append (parameterName )
193
+ .append ("))" );
194
+ }
176
195
break ;
177
196
default :
178
197
declaration
@@ -212,7 +231,7 @@ private void delegateReactively(StringBuilder declaration) {
212
231
.append ( '.' )
213
232
.append ( operationName );
214
233
// note that there is no upsertAll() method
215
- argument ( declaration , "All" );
234
+ argument ( declaration );
216
235
if ( isGeneratedIdUpsert () ) {
217
236
declaration
218
237
.append (')' );
You can’t perform that action at this time.
0 commit comments