@steedos/standard-object-database 2.5.0-beta.24 → 2.5.0-beta.25
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.
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* @Author: sunhaolin@hotoa.com
|
|
3
3
|
* @Date: 2021-06-03 15:11:52
|
|
4
4
|
* @LastEditors: baozhoutao@steedos.com
|
|
5
|
-
* @LastEditTime: 2023-
|
|
5
|
+
* @LastEditTime: 2023-05-15 09:26:19
|
|
6
6
|
* @Description:
|
|
7
7
|
*/
|
|
8
8
|
const Cache = require('@steedos/cachers');
|
|
@@ -78,7 +78,8 @@ module.exports = {
|
|
|
78
78
|
const count = await objectql.getObject('object_triggers').count({filters: [['_name', '=', doc._name], ['listenTo','=', doc.listenTo]]})
|
|
79
79
|
if(count > 0){
|
|
80
80
|
throw new Error('触发器名称不能重复')
|
|
81
|
-
}
|
|
81
|
+
}
|
|
82
|
+
doc.name = `${doc.listenTo}_${doc._name}`
|
|
82
83
|
},
|
|
83
84
|
beforeUpdate: async function () {
|
|
84
85
|
const doc = this.doc;
|
|
@@ -88,6 +89,7 @@ module.exports = {
|
|
|
88
89
|
const count = await objectql.getObject('object_triggers').count({filters: [['_name', '=', doc._name], ['listenTo','=', doc.listenTo], ['_id', '!=', this.id]]})
|
|
89
90
|
if(count > 0){
|
|
90
91
|
throw new Error('触发器名称不能重复')
|
|
91
|
-
}
|
|
92
|
+
}
|
|
93
|
+
doc.name = `${doc.listenTo}_${doc._name}`
|
|
92
94
|
}
|
|
93
95
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@steedos/standard-object-database",
|
|
3
|
-
"version": "2.5.0-beta.
|
|
3
|
+
"version": "2.5.0-beta.25",
|
|
4
4
|
"main": "package.service.js",
|
|
5
5
|
"private": false,
|
|
6
6
|
"publishConfig": {
|
|
@@ -15,5 +15,5 @@
|
|
|
15
15
|
},
|
|
16
16
|
"repository": {},
|
|
17
17
|
"license": "MIT",
|
|
18
|
-
"gitHead": "
|
|
18
|
+
"gitHead": "07943cbedb6caa88cc6a6d365c9fa3603660413d"
|
|
19
19
|
}
|