Fabio Manganiello
e71c312133
Always read an entity's parent through get_parent when climbing up.
...
This should avoid the risk of `DetachedInstanceError` by retrieving the
object into the session if it's not available.
2023-03-22 22:41:09 +01:00
Fabio Manganiello
878fe91155
Big rewrite/refactor of the entities merger
2023-03-19 12:40:48 +01:00
Fabio Manganiello
31552963c4
`EntitiesDb.upsert` should return a deep copy of the upserted entities.
...
Not the upserted entities themselves, no matter if expunged or made transient.
Reminder to my future self: returning the flushed entities and then using them
outside of the session or in another thread opens a big can of worms when using
SQLAlchemy.
2023-03-10 12:06:36 +01:00
Fabio Manganiello
72a9a9dfcf
LINT/type fixes
2023-02-19 22:56:45 +01:00
Fabio Manganiello
38438230d7
The batch of entities currently being processed should have no duplicate keys
2023-01-11 01:22:56 +01:00
Fabio Manganiello
b0464219d3
Large refactor of the entities engine.
2022-12-17 21:41:23 +01:00