Skip to content

ManagerRegistry: reset also persisters in UnitOfWork#140

Open
ojanota wants to merge 2 commits into
contributte:masterfrom
ojanota:manager-registry/reset-entity-manager
Open

ManagerRegistry: reset also persisters in UnitOfWork#140
ojanota wants to merge 2 commits into
contributte:masterfrom
ojanota:manager-registry/reset-entity-manager

Conversation

@ojanota

@ojanota ojanota commented Jun 18, 2026

Copy link
Copy Markdown

UnitOfWork is cleared after EntityManager failure, but it keeps cached EntityPersister inside. So if you want to e.g. create other insert query, UoW uses the same persister as before failure. The EntityPersister has its own cache for inserts and it tries to insert previous query with empty values. Using this EntityManager with same persister fails though.

ojanota added 2 commits June 18, 2026 17:10
UnitOfWork is cleared after EntityManager failure, but it keeps cached EntityPersister inside.
So if you want to e.g. create other insert query, UoW uses the same persister as before failure. The EntityPersister has its own cache for inserts and it tries to insert previous query with empty values.
Using this EntityManager with same persister fails though.
@ojanota ojanota force-pushed the manager-registry/reset-entity-manager branch from c8b5232 to 063a07d Compare June 18, 2026 16:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant