Skip to content

feat(sqlalchemy): manage session lifecycle when the session is created implicitly#869

Draft
AlexPetul wants to merge 1 commit into
litestar-org:mainfrom
AlexPetul:fix/sqlalchemy-session-cleanup
Draft

feat(sqlalchemy): manage session lifecycle when the session is created implicitly#869
AlexPetul wants to merge 1 commit into
litestar-org:mainfrom
AlexPetul:fix/sqlalchemy-session-cleanup

Conversation

@AlexPetul

Copy link
Copy Markdown
Contributor

Description

Add ownership-aware cleanup for SQLAlchemy sessions created by sessionmaker and scoped_session / async equivalents. The factory now closes or removes sessions it instantiates, and leaving user-owned session instances untouched.

Closes #866

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.

Bug: SQLAlchemyFactory async persistence does not close session

1 participant