8 Commits

Author SHA1 Message Date
Alexandre Bodin
7c8d51d15d fix 204 issues and use strapi.db.getModelByAssoc
Signed-off-by: Alexandre Bodin <bodin.alex@gmail.com>
2020-07-08 10:59:38 +02:00
Jean-Sébastien Herbaux
a583d1b859
Fix/#3184/fix server crashs on database change (#5703)
* Don't set connection field on create/edit operation on content-types & components

Signed-off-by: Convly <jean-sebastien.herbaux@epitech.eu>

* Make sure that every component has a valid connection attribute

Signed-off-by: Convly <jean-sebastien.herbaux@epitech.eu>

* Remove connection check on components load

Signed-off-by: Convly <jean-sebastien.herbaux@epitech.eu>

* Remove default connections from core & webhook stores but make sure it's defined in the application lifecycle

Signed-off-by: Convly <jean-sebastien.herbaux@epitech.eu>

* Fix component's associations that can be undefined instead of empty in populateBareAssociations

Signed-off-by: Convly <jean-sebastien.herbaux@epitech.eu>

* Remove "default" connection from plugins' models

Signed-off-by: Convly <jean-sebastien.herbaux@epitech.eu>

* Remove connection attribute from generated models (cli)

Signed-off-by: Convly <jean-sebastien.herbaux@epitech.eu>

* Mutate each component instead of reassign

Signed-off-by: Convly <jean-sebastien.herbaux@epitech.eu>

* Build core_store and webhook model based on the current config

Signed-off-by: Convly <jean-sebastien.herbaux@epitech.eu>

* Add connection to templates conditionally (based on args)

Signed-off-by: Convly <jean-sebastien.herbaux@epitech.eu>

* Set default value for description to undefined instead of empty string

Signed-off-by: Convly <jean-sebastien.herbaux@epitech.eu>

* Remove unnecessary complexity

Signed-off-by: Convly <jean-sebastien.herbaux@epitech.eu>

* Update getStarted models

Signed-off-by: Convly <jean-sebastien.herbaux@epitech.eu>

* Fix attributes parsing for generate:model

Signed-off-by: Convly <jean-sebastien.herbaux@epitech.eu>

* Removed tpl option from generate:model/api

Signed-off-by: Convly <jean-sebastien.herbaux@epitech.eu>

* Remove tpl option from cli

Signed-off-by: Convly <jean-sebastien.herbaux@epitech.eu>
2020-04-07 16:31:44 +02:00
Pierre Noël
9990759dd5 always populate with components
Signed-off-by: Pierre Noël <pierre.noel@strapi.io>
2020-03-16 15:43:03 +01:00
Alexandre Bodin
d45b350013 Add morph rel on populate compo relation 2019-12-23 10:45:34 +01:00
Alexandre Bodin
cfe625f90e Add polymorphic relation to bare populates 2019-12-17 09:11:49 +01:00
Alexandre Bodin
90db5092b4 populate bare associations to avoid circular populating 2019-12-16 14:10:20 +01:00
Alexandre Bodin
a5288f0cf7 Implement new populate algorithm loading nested components and dynamic zones 2019-11-13 18:49:05 +01:00
Alexandre Bodin
80fb99f38e Refactor populateFetch in its own module 2019-11-13 18:49:04 +01:00