From 87bf91e49fe650e3bae631ff0dc94402b44f9159 Mon Sep 17 00:00:00 2001 From: Adiel Ben Moshe <62875424+adielBm@users.noreply.github.com> Date: Mon, 6 Dec 2021 16:37:06 +0200 Subject: [PATCH 1/3] lifecycles.js file is not generated automatically I think since version 4, the lifecycles.js file is not created automatically but needs to be created manually, if needed. Postscript Correct me if I'm wrong. You can also rephrase this change if it is relevant and true. Thanks --- .../latest/development/backend-customization/models.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/developer-docs/latest/development/backend-customization/models.md b/docs/developer-docs/latest/development/backend-customization/models.md index 48815b28ac..29ec4c888e 100644 --- a/docs/developer-docs/latest/development/backend-customization/models.md +++ b/docs/developer-docs/latest/development/backend-customization/models.md @@ -27,10 +27,10 @@ Content-types in Strapi can be created: - with the [Content-Type Builder in the admin panel](/user-docs/latest/content-types-builder/introduction-to-content-types-builder.md), - or with [Strapi's interactive CLI `strapi generate`](/developer-docs/latest/developer-resources/cli/CLI.md#strapi-generate) command. -Creating a content-type with either method generates 2 files: +The content-types has the following models files: -- `schema.json` for the model's [schema](#model-schema) definition, -- `lifecycles.js` for [lifecycle hooks](#lifecycle-hooks). +- `schema.json` for the model's [schema](#model-schema) definition. (generated automatically, when creating content-type with either method) +- `lifecycles.js` for [lifecycle hooks](#lifecycle-hooks). (can be generated manually) These models files are stored in `./src/api/[api-name]/content-types/[content-type-name]/`, and any JavaScript or JSON file found in these folders will be loaded as a content-type's model (see [project structure](/developer-docs/latest/setup-deployment-guides/file-structure.md)). From 83012055d1bfd1f5173f3faf50dea8b3e9d7f5a5 Mon Sep 17 00:00:00 2001 From: Adiel Ben Moshe <62875424+adielBm@users.noreply.github.com> Date: Sat, 11 Dec 2021 18:14:08 +0200 Subject: [PATCH 2/3] Update docs/developer-docs/latest/development/backend-customization/models.md Co-authored-by: DMehaffy --- .../latest/development/backend-customization/models.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/developer-docs/latest/development/backend-customization/models.md b/docs/developer-docs/latest/development/backend-customization/models.md index 29ec4c888e..374c4fc3ad 100644 --- a/docs/developer-docs/latest/development/backend-customization/models.md +++ b/docs/developer-docs/latest/development/backend-customization/models.md @@ -30,7 +30,7 @@ Content-types in Strapi can be created: The content-types has the following models files: - `schema.json` for the model's [schema](#model-schema) definition. (generated automatically, when creating content-type with either method) -- `lifecycles.js` for [lifecycle hooks](#lifecycle-hooks). (can be generated manually) +- `lifecycles.js` for [lifecycle hooks](#lifecycle-hooks). (must be created manually) These models files are stored in `./src/api/[api-name]/content-types/[content-type-name]/`, and any JavaScript or JSON file found in these folders will be loaded as a content-type's model (see [project structure](/developer-docs/latest/setup-deployment-guides/file-structure.md)). From 684ef038c6823b644089048d67a5e2b18290dd0f Mon Sep 17 00:00:00 2001 From: Adiel Ben Moshe <62875424+adielBm@users.noreply.github.com> Date: Wed, 15 Dec 2021 15:58:57 +0200 Subject: [PATCH 3/3] Update docs/developer-docs/latest/development/backend-customization/models.md Co-authored-by: Pierre Wizla --- .../latest/development/backend-customization/models.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/developer-docs/latest/development/backend-customization/models.md b/docs/developer-docs/latest/development/backend-customization/models.md index 374c4fc3ad..eb4dddf62f 100644 --- a/docs/developer-docs/latest/development/backend-customization/models.md +++ b/docs/developer-docs/latest/development/backend-customization/models.md @@ -30,7 +30,7 @@ Content-types in Strapi can be created: The content-types has the following models files: - `schema.json` for the model's [schema](#model-schema) definition. (generated automatically, when creating content-type with either method) -- `lifecycles.js` for [lifecycle hooks](#lifecycle-hooks). (must be created manually) +- `lifecycles.js` for [lifecycle hooks](#lifecycle-hooks). This file must be created manually. These models files are stored in `./src/api/[api-name]/content-types/[content-type-name]/`, and any JavaScript or JSON file found in these folders will be loaded as a content-type's model (see [project structure](/developer-docs/latest/setup-deployment-guides/file-structure.md)).