Thank You, works like a charm
четверг, 22 июля 2021 г. в 00:26:57 UTC+3, Mike Bayer:
> you need to chain those like:
>
> selectinload(Database.person).selectinload(Person.city)
>
> docs:
>
>
>
you need to chain those like:
selectinload(Database.person).selectinload(Person.city)
docs:
https://docs.sqlalchemy.org/en/14/orm/loading_relationships.html#relationship-loading-with-loader-options
On Wed, Jul 21, 2021, at 4:25 PM, sector119 wrote:
> Hello, Mike
>
> When I want to use some
Hello, Mike
When I want to use some relationship I just set selectinload option on it
like
s = select(Database).options(selectinload(Database.person))
Here Database.person is relationship with Person model
But what to do if I want to access some relationship of Person model? For
example