File tree Expand file tree Collapse file tree 1 file changed +11
-3
lines changed
hsweb-commons/hsweb-commons-crud/src/main/java/org/hswebframework/web/crud/configuration Expand file tree Collapse file tree 1 file changed +11
-3
lines changed Original file line number Diff line number Diff line change 4
4
import lombok .Setter ;
5
5
import lombok .SneakyThrows ;
6
6
import lombok .extern .slf4j .Slf4j ;
7
+ import org .hswebframework .ezorm .rdb .metadata .RDBTableMetadata ;
7
8
import org .hswebframework .ezorm .rdb .operator .DatabaseOperator ;
8
9
import org .hswebframework .web .api .crud .entity .EntityFactory ;
9
10
import org .hswebframework .web .crud .entity .factory .MapperEntityFactory ;
@@ -53,13 +54,13 @@ public void afterPropertiesSet() {
53
54
factory .addMapping (entity .getEntityType (), MapperEntityFactory .defaultMapper (entity .getRealType ()));
54
55
}
55
56
}
57
+ List <Class > entities = this .entities .stream ().map (EntityInfo ::getRealType ).collect (Collectors .toList ());
58
+
56
59
if (properties .isAutoDdl ()) {
57
- //加载全部表信息
58
60
operator .getMetadata ()
59
61
.getCurrentSchema ()
60
62
.loadAllTable ();
61
-
62
- List <Class > entities = this .entities .stream ().map (EntityInfo ::getRealType ).collect (Collectors .toList ());
63
+ //加载全部表信息
63
64
// if (reactive) {
64
65
// Flux.fromIterable(entities)
65
66
// .doOnNext(type -> log.info("auto ddl for {}", type))
@@ -86,6 +87,13 @@ public void afterPropertiesSet() {
86
87
}
87
88
}
88
89
// }
90
+ } else {
91
+ for (Class <?> entity : entities ) {
92
+ RDBTableMetadata metadata = resolver .resolve (entity );
93
+ operator .getMetadata ()
94
+ .getCurrentSchema ()
95
+ .addTable (metadata );
96
+ }
89
97
}
90
98
}
91
99
}
You can’t perform that action at this time.
0 commit comments