vona-module-a-orm 5.0.37 → 5.0.38
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +4 -4
- package/dist/types/relationsDef.d.ts +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1412,12 +1412,12 @@ class BeanModelMeta extends BeanBase {
|
|
|
1412
1412
|
const beanOptions = appResource.getBean(modelClass2);
|
|
1413
1413
|
const beanFullName = beanOptions.beanFullName;
|
|
1414
1414
|
const options = beanOptions?.options;
|
|
1415
|
-
if (isNil(client) || client === '
|
|
1416
|
-
client = options?.client ? '
|
|
1415
|
+
if (isNil(client) || client === '_auto_') {
|
|
1416
|
+
client = options?.client ? '_initial_' : '_inherit_';
|
|
1417
1417
|
}
|
|
1418
|
-
if (client === '
|
|
1418
|
+
if (client === '_initial_') {
|
|
1419
1419
|
return this.app.bean._newBean(beanFullName, undefined, table);
|
|
1420
|
-
} else if (client === '
|
|
1420
|
+
} else if (client === '_inherit_') {
|
|
1421
1421
|
client = this.db;
|
|
1422
1422
|
}
|
|
1423
1423
|
return this.app.bean._newBean(beanFullName, client ?? this.db, table);
|
|
@@ -56,4 +56,4 @@ export interface IModelRelationOptionsMeta extends IModelRelationOptionsMetaBasi
|
|
|
56
56
|
export interface IModelRelationOptionsMetaWrapper {
|
|
57
57
|
meta?: IModelRelationOptionsMeta;
|
|
58
58
|
}
|
|
59
|
-
export type TypeModelRelationOptionsMetaClient = '
|
|
59
|
+
export type TypeModelRelationOptionsMetaClient = '_auto_' | '_initial_' | '_inherit_' | keyof IDatabaseClientRecord | ServiceDb;
|