On 7/29/06, Neilen Marais <[EMAIL PROTECTED]
> wrote:
Hi Neilen,
I agree that your suggestion covers a significant modelling use case. I'm not sure I agree with your suggested syntax, but completely separate from that issue, I can see one major problem.
How do you compose a query over the intermediary model? What is the filter() syntax that accesses the intermediary table from the models that are being related? The existing search syntax is well suited to traversing 1-N and N-N relations, but in N-N relations, the intermediary table is essentially transparent. I can't see any obvious syntax extension that would allow access to the intermediary table.
That said, the existing m2m-intermediary solution doesn't inherit the 'nice' N-N query syntax. However, there is a syntax that works, and it is unambiguous. Suggestions for improving this situation are welcome, but wholesale changes to the Django query syntax are not an option - existing models and queries must continue to work as-is.
Yours,
Russ Magee %-)
I'm just testing the waters to see what people think about an extended
ManyToManyField type that allows the addition of extra info to a link
withouth having to use an intermediary table/model like here:
http://www.djangoproject.com/documentation/models/m2m_intermediary/ .
Hi Neilen,
I agree that your suggestion covers a significant modelling use case. I'm not sure I agree with your suggested syntax, but completely separate from that issue, I can see one major problem.
How do you compose a query over the intermediary model? What is the filter() syntax that accesses the intermediary table from the models that are being related? The existing search syntax is well suited to traversing 1-N and N-N relations, but in N-N relations, the intermediary table is essentially transparent. I can't see any obvious syntax extension that would allow access to the intermediary table.
That said, the existing m2m-intermediary solution doesn't inherit the 'nice' N-N query syntax. However, there is a syntax that works, and it is unambiguous. Suggestions for improving this situation are welcome, but wholesale changes to the Django query syntax are not an option - existing models and queries must continue to work as-is.
Yours,
Russ Magee %-)
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---
