I need to get previous component data for a collection-type in lifecycle hook before the component data gets updated.
I tried getting the previous component data using 4 different methods in the beforeUpdate lifecycle hook, but in all 4 cases it returns me the updated component data rather than the previous component data before it gets updated. I listed the 4 methods I used and attached a screenshot of what I tried.
My collection-type is called tass and my component is called kickoutFlag just for some context.
Please can anyone tell me how I can get previous component data before it is updated in a lifecycle hook?
  1. strapi.requestContext.get();
  2. Using entityService api
  3. using strapi.query
  4. using strapi.db.query