You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: generators/spring-boot/templates/src/main/java/_package_/_entityPackage_/_partials_entity_/patch_template.ejs
Copy file name to clipboardExpand all lines: generators/spring-boot/templates/src/main/java/_package_/_entityPackage_/service/impl/_entityClass_ServiceImpl.java.ejs
+11Lines changed: 11 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -75,6 +75,9 @@ import java.util.List;
75
75
<%_ if (!reactive) { _%>
76
76
import java.util.Optional;
77
77
<%_ } _%>
78
+
<%_ if (updatableEntity &&!dtoMapstruct &&fields.some(field=>!field.id&&!field.transient)) { _%>
79
+
import java.util.function.Consumer;
80
+
<%_ } _%>
78
81
<%_ if (primaryKey.typeUUID) { _%>
79
82
import java.util.UUID;
80
83
<%_ } _%>
@@ -315,4 +318,12 @@ public class <%= serviceClassName %><% if (serviceImpl) { %> implements <%= enti
315
318
<%_ } } _%>
316
319
}
317
320
<%_ } _%>
321
+
<%_ if (updatableEntity &&!dtoMapstruct &&fields.some(field=>!field.id&&!field.transient)) { _%>
Copy file name to clipboardExpand all lines: generators/spring-boot/templates/src/main/java/_package_/_entityPackage_/web/rest/_entityClass_Resource.java.ejs
+11Lines changed: 11 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -120,6 +120,9 @@ import java.util.Optional;
120
120
<%_ if (primaryKey.hasUUID) { _%>
121
121
import java.util.UUID;
122
122
<%_ } _%>
123
+
<%_ if (updatableEntity &&!viaService &&!dtoMapstruct &&fields.some(field=>!field.id&&!field.transient)) { _%>
124
+
import java.util.function.Consumer;
125
+
<%_ } _%>
123
126
<%_ if ((searchEngineAny || fieldsContainNoOwnerOneToOne) &&!reactive) { _%>
124
127
<%_ if (!viaService) { _%>
125
128
import java.util.stream.Collectors;
@@ -518,4 +521,12 @@ public class <%= entityClass %>Resource {
0 commit comments