ayon-backend icon indicating copy to clipboard operation
ayon-backend copied to clipboard

Operations: Allow updating the same entity multiple times in one batch (operations)

Open martastain opened this issue 7 months ago • 0 comments

operations endpoint prevents duplicate targets tuple(entity_type, entity_id) for update and delete operations, since entity is loaded first using SELECT FOR UPDATE.

https://github.com/ynput/ayon-backend/pull/74

To lift this limit, we could reuse existing entity instances (keep all opened entities in a cache for the entire request lifecycle). That would require a refactoring of the endpoint.

Possible use case:

  • change name folder-a ➝ tmp111
  • change name folder-b ➝ folder-a
  • change name tmp111 ➝ folder-b

martastain avatar Jul 18 '24 10:07 martastain