> The first is that I'd like it to be compatible with deferred loading
> of model attributes - I haven't looked in to it, but my hunch is that
> this won't be too hard (it might even work in its present form without
> any further changes).

The current implementation doesn't support this.  It will actually
raise an exception if not all of the fields have been provided.  For
now I was looking to get something basic out there to get the ball
rolling.  Once I have the docs for the current implementation done
I'll look into what it will take to do this.

>
> The second one is probably a lot harder - it feels to me like this
> feature would be much more useful if it could perform select_related
> style graph population. One of the key use-cases for raw SQL is
> improving performance - writing queries which perform better than the
> ORM (SQL optimisations, or queries that hit an alternative view or use
> a stored procedure or similar). It's very plausible that a developer
> might want to write a custom query that populates a full graph of
> objects, just like select_related() does. It would be really useful if
> the QuerySet.raw() method let them do that.
>
> I haven't looked at how much work it would be to support graph
> population - it will certainly complicate the user-facing API, and it
> might require a bunch of work at the ORM level. If it's just too much
> hassle I think the feature would be worth including without it, but
> it's certainly worth some further investigation.
>

This one also isn't implemented right now.  I've had a few thoughts on
how it could be done but they all result in a somewhat ugly API.

The least ugly option I've thought of so far would be to accept an
optional parameter called related_available which would expect a tuple
of tuples.  The inner tuple(s) would include a prefix for the columns
with related data and the name of the related field.

I definitely would be interested in hearing other suggestions.

-Sean
--~--~---------~--~----~------------~-------~--~----~
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