Skip to content

数据源跟表的映射问题 #101

@1059997476

Description

@1059997476

在初始化initConfigMappingTables的时候,把所有模块的实体表都放到当前模块的数据源的datasourceConfig里,结果在启动ActiveRecordPlugin的时候当前数据源肯定没有其他模块的表呀。
问题点就在ClassScanner.scanSubClass(Model.class)获取当前模块和依赖的其他模块所有model的子类,然后当前模块都配置了具有哪些表,还加到dataSourceConfig的tableinfo里去,所以
if(configTables != null && configTables.contains(tableInfo.getTableName))){
dataSourceConfig.addTableInfo(tableInfo,true);
continue;
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions