@nocobase/plugin-data-source-main 2.0.0-alpha.42 → 2.0.0-alpha.44

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.
@@ -8,15 +8,15 @@
8
8
  */
9
9
 
10
10
  module.exports = {
11
- "@nocobase/client": "2.0.0-alpha.42",
11
+ "@nocobase/client": "2.0.0-alpha.44",
12
12
  "lodash": "4.17.21",
13
- "@nocobase/database": "2.0.0-alpha.42",
14
- "@nocobase/plugin-error-handler": "2.0.0-alpha.42",
15
- "@nocobase/server": "2.0.0-alpha.42",
13
+ "@nocobase/database": "2.0.0-alpha.44",
14
+ "@nocobase/plugin-error-handler": "2.0.0-alpha.44",
15
+ "@nocobase/server": "2.0.0-alpha.44",
16
16
  "sequelize": "6.35.2",
17
17
  "@formily/json-schema": "2.3.7",
18
- "@nocobase/test": "2.0.0-alpha.42",
19
- "@nocobase/utils": "2.0.0-alpha.42",
20
- "@nocobase/actions": "2.0.0-alpha.42",
18
+ "@nocobase/test": "2.0.0-alpha.44",
19
+ "@nocobase/utils": "2.0.0-alpha.44",
20
+ "@nocobase/actions": "2.0.0-alpha.44",
21
21
  "dayjs": "1.11.13"
22
22
  };
@@ -0,0 +1,4 @@
1
+ {
2
+ "field-name-exists": "Имя поля \"{{name}}\" уже существует в коллекции \"{{collectionName}}\"",
3
+ "field-is-depended-on-by-other": "Нельзя удалить поле \"{{fieldName}}\" в \"{{fieldCollectionName}}\", оно используется полем \"{{dependedFieldName}}\" в \"{{dependedFieldCollectionName}}\" как \"{{dependedFieldAs}}\""
4
+ }
@@ -103,6 +103,7 @@ function afterCreateForForeignKeyField(db) {
103
103
  instance.set("sort", 1);
104
104
  instance.set("isForeignKey", true);
105
105
  await instance.save({ transaction });
106
+ await instance.load({ transaction });
106
107
  } else {
107
108
  const createOptions = {
108
109
  values: {
@@ -114,9 +115,10 @@ function afterCreateForForeignKeyField(db) {
114
115
  if (interfaceType === "m2o") {
115
116
  createOptions["context"] = {};
116
117
  }
117
- const creatInstance = await r.create(createOptions);
118
- creatInstance.set("sort", 1);
119
- await creatInstance.save({ transaction });
118
+ const createdInstance = await r.create(createOptions);
119
+ createdInstance.set("sort", 1);
120
+ await createdInstance.save({ transaction });
121
+ await createdInstance.load({ transaction });
120
122
  }
121
123
  await r.update({
122
124
  filter: {
package/package.json CHANGED
@@ -1,12 +1,15 @@
1
1
  {
2
2
  "name": "@nocobase/plugin-data-source-main",
3
3
  "displayName": "Data source: Main",
4
+ "displayName.ru-RU": "Основной Источник данных",
4
5
  "displayName.zh-CN": "数据源:主数据库",
5
6
  "description": "NocoBase main database, supports relational databases such as PostgreSQL, MySQL, MariaDB and so on.",
7
+ "description.ru-RU": "Основная база данных NocoBase: поддерживает реляционные СУБД, включая PostgreSQL, MySQL, MariaDB и другие.",
6
8
  "description.zh-CN": "NocoBase 主数据库,支持 PostgreSQL、MySQL、MariaDB 等关系型数据库。",
7
- "version": "2.0.0-alpha.42",
9
+ "version": "2.0.0-alpha.44",
8
10
  "main": "./dist/server/index.js",
9
11
  "homepage": "https://docs.nocobase.com/handbook/data-source-main",
12
+ "homepage.ru-RU": "https://docs-ru.nocobase.com/handbook/data-source-main",
10
13
  "homepage.zh-CN": "https://docs-cn.nocobase.com/handbook/data-source-main",
11
14
  "license": "AGPL-3.0",
12
15
  "devDependencies": {
@@ -22,7 +25,7 @@
22
25
  "@nocobase/test": "2.x",
23
26
  "@nocobase/utils": "2.x"
24
27
  },
25
- "gitHead": "9e96dd78d0c1445c8da76863e30f046be5b48d90",
28
+ "gitHead": "075bd484c270740fe9b02f1989818da91139b6b9",
26
29
  "keywords": [
27
30
  "Data sources"
28
31
  ]