Hi,

Say that I have a model Train and it has a ManyToMany to model Seat. I'm 
looking at a queryset of Train and I want to do a prefetch_related on it, 
but I don't want to get all the Seat objects; I want only the first Seat 
object for each Train object.  Is this possible with prefetch_related 
and/or Prefetch? How? 

To clarify: My goal here is to save on querysets while still being able to 
retrieve the first Seat object in each `train.seats`.


Thanks,
Ram.

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/1d6fc84a-2042-40b5-98be-40bd971e706c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to