Sfoglia il codice sorgente

启动时加载全部表信息

zhou-hao 5 anni fa
parent
commit
3cf20cdb47

+ 5 - 0
hsweb-commons/hsweb-commons-crud/src/main/java/org/hswebframework/web/crud/configuration/AutoDDLProcessor.java

@@ -46,6 +46,11 @@ public class AutoDDLProcessor implements InitializingBean {
             }
         }
         if (properties.isAutoDdl()) {
+            //加载全部表信息
+            operator.getMetadata()
+                    .getCurrentSchema()
+                    .loadAllTable();
+
             List<Class> entities = this.entities.stream().map(EntityInfo::getRealType).collect(Collectors.toList());
             if (reactive) {
                 Flux.fromIterable(entities)