diff --git a/README.md b/README.md
index 2206cd4079..cd4316975b 100644
--- a/README.md
+++ b/README.md
@@ -91,10 +91,12 @@ Complete installation requirements can be found in the documentation under = 5.7.8
-- MariaDB >= 10.2.7
-- PostgreSQL >= 10
-- SQLite >= 3
+| Database | Minimum | Recommended |
+| ---------- | ------- | ----------- |
+| MySQL | 5.7.8 | 8.0 |
+| MariaDB | 10.3 | 10.6 |
+| PostgreSQL | 11.0 | 14.0 |
+| SQLite | 3 | 3 |
**We recommend always using the latest version of Strapi to start your new projects**.
diff --git a/packages/core/admin/admin/src/translations/es.json b/packages/core/admin/admin/src/translations/es.json
index a0cabcf3a7..5cbe0d33a3 100644
--- a/packages/core/admin/admin/src/translations/es.json
+++ b/packages/core/admin/admin/src/translations/es.json
@@ -759,7 +759,7 @@
"global.table.header.roles": "Roles",
"global.table.header.username": "Nombre de usuario",
"global.type": "Tipo",
- "global.users": "Useuarios",
+ "global.users": "Usuarios",
"notification.warning.404": "404 - No Encontrado"
}
diff --git a/packages/core/database/lib/entity-manager.js b/packages/core/database/lib/entity-manager.js
index e074b27408..7d492e4b71 100644
--- a/packages/core/database/lib/entity-manager.js
+++ b/packages/core/database/lib/entity-manager.js
@@ -776,7 +776,6 @@ const createEntityManager = (db) => {
}
},
- // TODO: support multiple relations at once with the populate syntax
// TODO: add lifecycle events
async populate(uid, entity, populate) {
const entry = await this.findOne(uid, {
@@ -788,30 +787,37 @@ const createEntityManager = (db) => {
return { ...entity, ...entry };
},
- // TODO: support multiple relations at once with the populate syntax
// TODO: add lifecycle events
- async load(uid, entity, field, params) {
+ async load(uid, entity, fields, params) {
const { attributes } = db.metadata.get(uid);
- const attribute = attributes[field];
+ const fieldsArr = _.castArray(fields);
+ fieldsArr.forEach((field) => {
+ const attribute = attributes[field];
- if (!attribute || attribute.type !== 'relation') {
- throw new Error('Invalid load. Expected a relational attribute');
- }
+ if (!attribute || attribute.type !== 'relation') {
+ throw new Error(`Invalid load. Expected ${field} to be a relational attribute`);
+ }
+ });
const entry = await this.findOne(uid, {
select: ['id'],
where: { id: entity.id },
- populate: {
- [field]: params || true,
- },
+ populate: fieldsArr.reduce((acc, field) => {
+ acc[field] = params || true;
+ return acc;
+ }, {}),
});
if (!entry) {
return null;
}
- return entry[field];
+ if (Array.isArray(fields)) {
+ return _.pick(fields, entry);
+ }
+
+ return entry[fields];
},
// cascading
diff --git a/packages/core/strapi/README.md b/packages/core/strapi/README.md
index 575ab98e86..cd4316975b 100644
--- a/packages/core/strapi/README.md
+++ b/packages/core/strapi/README.md
@@ -1,8 +1,12 @@
+
The most advanced open-source headless CMS to build powerful APIs with no effort.API creation made simple, secure and fast.
+
+
+