mirror of
https://github.com/cool-team-official/cool-admin-midway-packages.git
synced 2025-12-23 22:20:16 +00:00
自动识别实体是哪个链接源
This commit is contained in:
parent
61a25cc214
commit
fb32283ded
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@cool-midway/core",
|
"name": "@cool-midway/core",
|
||||||
"version": "7.1.13",
|
"version": "7.1.14",
|
||||||
"description": "",
|
"description": "",
|
||||||
"main": "dist/index.js",
|
"main": "dist/index.js",
|
||||||
"typings": "index.d.ts",
|
"typings": "index.d.ts",
|
||||||
|
|||||||
@ -81,6 +81,7 @@ export abstract class BaseController {
|
|||||||
if (entity) {
|
if (entity) {
|
||||||
const dataSourceName =
|
const dataSourceName =
|
||||||
this.typeORMDataSourceManager.getDataSourceNameByModel(entity);
|
this.typeORMDataSourceManager.getDataSourceNameByModel(entity);
|
||||||
|
this.connectionName = dataSourceName;
|
||||||
let entityModel = this.typeORMDataSourceManager
|
let entityModel = this.typeORMDataSourceManager
|
||||||
.getDataSource(dataSourceName)
|
.getDataSource(dataSourceName)
|
||||||
.getRepository(entity);
|
.getRepository(entity);
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@cool-midway/core",
|
"name": "@cool-midway/core",
|
||||||
"version": "7.1.13",
|
"version": "7.1.14",
|
||||||
"description": "",
|
"description": "",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"typings": "index.d.ts",
|
"typings": "index.d.ts",
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user