From 7b28777825d8192065faba6eea69ee9715feb8d4 Mon Sep 17 00:00:00 2001 From: Alexandre Bodin Date: Tue, 6 Aug 2019 11:58:28 +0200 Subject: [PATCH] Add uids to models --- packages/strapi/lib/core/bootstrap.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/packages/strapi/lib/core/bootstrap.js b/packages/strapi/lib/core/bootstrap.js index 29cf59c803..9874911a86 100644 --- a/packages/strapi/lib/core/bootstrap.js +++ b/packages/strapi/lib/core/bootstrap.js @@ -64,6 +64,7 @@ module.exports = function(strapi) { Object.assign(model, { modelType: 'contentType', + uid: `app::${key}.${index}`, apiName: key, globalId: model.globalId || _.upperFirst(_.camelCase(index)), collectionName: model.collectionName || `${index}`.toLocaleLowerCase(), @@ -131,6 +132,7 @@ module.exports = function(strapi) { Object.assign(model, { modelType: 'contentType', + uid: `strapi::admin.${key}`, identity: model.identity || _.upperFirst(key), globalId: model.globalId || _.upperFirst(_.camelCase(`admin-${key}`)), connection: @@ -160,6 +162,7 @@ module.exports = function(strapi) { Object.assign(model, { modelType: 'contentType', + uid: `plugins::${pluginName}.${key}`, plugin: pluginName, collectionName: model.collectionName || `${pluginName}_${key}`.toLowerCase(),