awaitable_attrs missing in SQLModel #868
Replies: 1 comment 1 reply
-
As an FYI, I haven't been able to get the AsyncAttrs mixin to work either, but the lazy load options can be set to "selectin" using the sa_relationship_kwargs param as shown here: (edited to add additional details)
And this does give the |
Beta Was this translation helpful? Give feedback.
-
First Check
Commit to Help
Example Code
copied from sql alchemy documentation
I did not have a working example for sqlmodel without sensitive data
Description
With sqlalchemy 2.0, adding the AsyncAttrs mixin in your model or Base class makes it easy to lazy-load collections async via the awaitable_attrs namespace
I could not find that namespace within SQLModel. What is the best practices to lazy load in sqlmodel
Operating System
Linux
Operating System Details
No response
SQLModel Version
0.0.16
Python Version
3.11
Additional Context
No response
Beta Was this translation helpful? Give feedback.
All reactions