Closed neonarc4 closed 11 months ago
selected_events = await Event.filter(
participants=participants[0].id
).prefetch_related('participants', 'tournament')
# Tortoise supports variable depth of prefetching related entities
# This will fetch all events for Team and in those events tournaments will be prefetched
await Team.all().prefetch_related('events__tournament')
both of them dont work
why their is no relationship model fetching logic in ur fastapi or any example how can we fetch relationship model
what is the reason u have prefetch when it not prefetch anything