You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It turns out that to display related data from another table I have to use selectinload() for lazy loading and not make the slow request when there is too much data. In SQLAlchemy it is imported with from sqlalchemy.orm import selectinload. But I am going to do the same in SQLModel and that method does not work, only the join() appears. I fully understand that SQLModel is a base model built on top of SQLAlchemy, but it would be great if they integrated that method, it helps a lot.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
First Check
Commit to Help
Example Code
Description
It turns out that to display related data from another table I have to use selectinload() for lazy loading and not make the slow request when there is too much data. In SQLAlchemy it is imported with from sqlalchemy.orm import selectinload. But I am going to do the same in SQLModel and that method does not work, only the join() appears. I fully understand that SQLModel is a base model built on top of SQLAlchemy, but it would be great if they integrated that method, it helps a lot.
Operating System
Windows
Operating System Details
Windows 11 HOME
SQLModel Version
0.0.14
Python Version
3.13.1
Additional Context
No response
Beta Was this translation helpful? Give feedback.
All reactions