- Strapi Version: 4.1.12
- Operating System: Ubuntu
- Database: PostgreSQL
- Node Version: 16
- NPM Version: 8
- Yarn Version:
I have created two lifecycle hooks in collection X. On afterFindOne and afterFindMany it checks to see if a specific field has a value and if not setting it to a default value.
I have another collection Y. It has a one-to-many relationship with X.
When I i call /api/Xs/1 The field is properly filled with the default value. “x.attributes.field” == Default Value
However, when I call /api/Ys/1?populate=* it is not. “y.attributes.x.data.attributes.field” == null
Am I missing something here or is this just the way it is supposed to be? Is lifecyclehooks not being called on populated relation collections?