mirror of
https://github.com/sqlalchemy/sqlalchemy.git
synced 2026-06-21 08:02:15 -04:00
9030af40ba
Fixed issue where the presence of a :meth:`.SessionEvents.do_orm_execute` event hook would cause internal execution options such as ``yield_per`` and loader-specific state from the first ``orm_pre_session_exec`` pass to leak into the second pass, leading to errors when using relationship loaders such as :func:`.selectinload` and :func:`.immediateload`. The execution options passed to the second compilation pass are now based on the original options plus only the explicit updates made via :meth:`.ORMExecuteState.update_execution_options` within the event hook. Fixes: #13301 Change-Id: Ide64d7202102930b68a2ab903054d538cd2f99dd