teszt állományok áthelyezése és szelektálása
This commit is contained in:
@@ -70,12 +70,14 @@ async def get_current_user(
|
||||
# We need to load the person relationship to avoid lazy loading issues
|
||||
# Also load Person.address for nested profile response
|
||||
from app.models.identity import Person
|
||||
from app.models.identity.address import Address
|
||||
from app.models.identity.address import Address, GeoPostalCode
|
||||
stmt = (
|
||||
select(User)
|
||||
.where(User.id == int(user_id))
|
||||
.options(
|
||||
joinedload(User.person).joinedload(Person.address)
|
||||
joinedload(User.person)
|
||||
.joinedload(Person.address)
|
||||
.joinedload(Address.postal_code) # <-- EZ KELL IDE: postal_code eager loading a zip/city property-khez
|
||||
)
|
||||
)
|
||||
result = await db.execute(stmt)
|
||||
|
||||
Reference in New Issue
Block a user