Skip to content

Conversation

@flipbit03
Copy link
Owner

Summary

  • Replace subqueryload with selectinload in test_lambda_stmt_with_subqueryload test
  • Rename test to test_lambda_stmt_with_selectinload_multiple_children to avoid duplicate names

Why

SQLAlchemy emits a warning when using subqueryload with lambda_stmt:

SAWarning: subqueryloader for "SDParent.children" must invoke lambda callable... Consider using selectinload() for more effective full-lambda caching

This is because subqueryload doesn't cache efficiently with lambda statements.

Test plan

  • All tests pass
  • Lint passes (make lint)
  • Type check passes (make typecheck)
  • No SAWarning when running with -W error::sqlalchemy.exc.SAWarning

…bqueryload

subqueryload has caching issues with lambda_stmt, causing SQLAlchemy to emit
a warning recommending selectinload for more effective full-lambda caching.
@flipbit03 flipbit03 merged commit cc3d338 into main Jan 26, 2026
6 checks passed
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.

2 participants