> I have looked into the code and think implementing this should be
> possible, but needs some changes in the django-ORM itself. 

I read some of the code around Queryset, Model Inheritance and the
Query-object itself. I _think_ the parts where django needs some
adjustments can be limited to two patches:

1. conditional joins:
Add the ability to use more complex conditions for the ON-clause in
JOINs, meaning allow JOINs to be more than just "left_table.left_field =
right_table.right_field". Perhaps WhereNode
(django.db.sql.where.WhereNode) can be used, as this seems pretty
generic (used for WHERE and HAVING already). Not sure about the
dependencies WhereNode has on JOINs, so perhaps this ends in an chicken
and egg problem.

2. foreign (model) fields:
Add the ability to use fields from other tables as if they are present
in the current Model. Model inheritance currently uses this. Foreign
fields by design always need some JOIN related to them, so this will
depend on conditional joins. If this gets implemented perhaps model
inheritance can be rewritten to use foreign fields, as this looks like a
more generic approach.

Did I miss something?

Greetings, David Danier

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

Reply via email to