Files
channels-seerr/server/entity
Gauthier 48fbb5c032 fix(mediarequest): refactor to .save() instead of .update() for TypeORM
The .update() method of TypeORM doesn't come with all the functionalities of the .save()
method. Its goal is to partially update a Repository without doing any extra operation. This
introduces issues with event from the database subscriber not triggered correctly, because of
this partial update: https://github.com/typeorm/typeorm/issues/2809#issuecomment-451914877

This PR rollback to .save() instead of .update() to avoid the aforementioned issues, at the
cost of some lifehook issues. These issues are happening with PostgreSQL because the .save()
method shouldn't be used inside an Entity Listener, an Event Subscriber should be used instead:
https://orkhan.gitbook.io/typeorm/docs/listeners-and-subscribers#what-is-an-entity-listener
2025-04-30 13:28:33 +02:00
..
2021-10-24 12:44:20 +00:00
2024-12-29 05:20:35 +08:00
2025-04-29 17:25:36 +02:00