Files
sqlalchemy/test
bekapono 808fd28297 omit_join optimization for selectinload on many-to-many relationships
The :func:`.selectinload` loader strategy now selects the ``omit_join``
optimization for many-to-many non-self-referential relationships, reducing
the number of joins in the secondary SELECT by selecting from the secondary
table directly rather than joining back to the parent entity. ``omit_join``
is enabled automatically when the join condition determines that the
secondary table's foreign keys fully cover the parent's primary key. As
always, ``omit_join`` can be disabled by setting
:paramref:`.relationship.omit_join` to ``False``. Pull request courtesy
bekapono.

Fixes: #5987
Closes: #13278
Pull-request: https://github.com/sqlalchemy/sqlalchemy/pull/13278
Pull-request-sha: fdd9847e7d

Change-Id: Ib68f8e2be1399222383cdd7b55793fe88402212c
2026-05-27 13:23:10 -04:00
..
2026-05-10 19:00:42 +02:00
2026-05-10 19:00:42 +02:00
2026-05-10 19:00:42 +02:00