forked from platypush/platypush
Expunge entities after session commit to ensure that the ORM objects can be reused
This commit is contained in:
parent
71ccf6d04a
commit
691d109fb7
1 changed files with 3 additions and 0 deletions
|
@ -259,6 +259,9 @@ class EntitiesEngine(Thread):
|
||||||
session.add_all(entities)
|
session.add_all(entities)
|
||||||
session.commit()
|
session.commit()
|
||||||
|
|
||||||
|
for e in entities:
|
||||||
|
session.expunge(e)
|
||||||
|
|
||||||
with self._entities_cache_lock:
|
with self._entities_cache_lock:
|
||||||
for entity in entities:
|
for entity in entities:
|
||||||
self._cache_entities(entity, overwrite_cache=True)
|
self._cache_entities(entity, overwrite_cache=True)
|
||||||
|
|
Loading…
Reference in a new issue