On 20/11/12 12:08, tolomea wrote:
>>  it should do exactly what the developer asks.
> 
> How do I, the developer, request that it use select_related for topping_type
> part of the best_pizza__toppings__topping_type example given above?

Sorry for the slow reply. At the moment, there is no way to specify
that. (Unless you can use a default manager to do it, but that might be
constrained by other things).

It would be nice to come up with a better API for this kind of thing.
SQLAlchemy may have some good ideas in the way it does eager loading - I
believe it has support for equivalents of both select_related and
prefetch_related.

What I'm saying is that in the absence of that better API, or some way
of specifying the query you want, we shouldn't guess and convert one
optimisation into another.

Luke

-- 
OSBORN'S LAW
    Variables won't, constants aren't.

Luke Plant || http://lukeplant.me.uk/

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To post to this group, send email to django-developers@googlegroups.com.
To unsubscribe from this group, send email to 
django-developers+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-developers?hl=en.

Reply via email to