自动识别实体是哪个链接源

This commit is contained in:
cool 2024-03-22 17:57:35 +08:00
parent 61a25cc214
commit fb32283ded
3 changed files with 3 additions and 2 deletions

View File

@ -1,6 +1,6 @@
{
"name": "@cool-midway/core",
"version": "7.1.13",
"version": "7.1.14",
"description": "",
"main": "dist/index.js",
"typings": "index.d.ts",

View File

@ -81,6 +81,7 @@ export abstract class BaseController {
if (entity) {
const dataSourceName =
this.typeORMDataSourceManager.getDataSourceNameByModel(entity);
this.connectionName = dataSourceName;
let entityModel = this.typeORMDataSourceManager
.getDataSource(dataSourceName)
.getRepository(entity);

View File

@ -1,6 +1,6 @@
{
"name": "@cool-midway/core",
"version": "7.1.13",
"version": "7.1.14",
"description": "",
"main": "index.js",
"typings": "index.d.ts",