Building reply count field

No problem, it’s best when doing some custom stuff like this to skip straight to strapi.query() as that is what executes the database queries. Just remember that calling that .query inside of a lifecycle function especially since you have a self referencing relation could cause a race condition.

You will need to know when to “skip” or you will just cause a cascading recursion of lookups :stuck_out_tongue: A well place if () {} here would be a good idea.

1 Like