Closed coupster74 closed 1 year ago
I think I've figured it out.. but here for others. I was under the impression this was constructed when required, but as part of injection, it is constructed on start up.. and as shown above, the date is only set then... dumb.
I suspect this is not nestjs-query specific, but thought I would raise here with those who know more about the foundation of when/how assemblers are called.
I have entities that have a start date and an end date, and an isActive flag. I created an assembler which sets the isActive to true if the current date is between start and end date. This all works fine enough, however, when promoted into production, the isActive does not refresh - current date changes to be between start and end, and isActive remains false. It appears to be cached as a result set. Once I restart the service, then the results are appropriately refreshed.
few additional points..
This issue has been at play for a while and I'd appreciate any help I can get at this point.
here is the base entity:
and
here is an entity demonstrating this behaviour:
and here is the assembler