Re: Intermediate Table question
On Wed, Aug 5, 2009 at 12:58 AM, LeeRisqwrote: > > Does anyone know if an intermediate table can be specified on more > than two models? For instance: > > class A(m.Model): > B = ManyToManyField(B, through='D') > C = ManyToManyField(C, through='D') > > Will this validate and actually work? As long as D has a foreign Key FK relations with both B and C, it should validate. What you will end up with is a ternary relation between A, B, and C. Whether this is what you want is between you and your requirements :-) Yours, Russ Magee %-) --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---
Re: Intermediate Table question
On Tue, Aug 4, 2009 at 3:06 PM, LeeRisqwrote: > >> I don't believe it would work, but even if it did, what would this do? >> What's the expecected behavior? > > > class A defines an consumer order > > class B and C both define different lines of product > > I'd like to store all the ordering info in one intermediate table > while maintaining different tables for the porducts > > Lee > > > Bah, this is what I get for reading too quickly. The answer is maybe, you'd have to try it. I see no obvious reason it wouldn't work though. Alex -- "I disapprove of what you say, but I will defend to the death your right to say it." -- Voltaire "The people's good is the highest law." -- Cicero "Code can always be simpler than you think, but never as simple as you want" -- Me --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---
Re: Intermediate Table question
> I don't believe it would work, but even if it did, what would this do? > What's the expecected behavior? class A defines an consumer order class B and C both define different lines of product I'd like to store all the ordering info in one intermediate table while maintaining different tables for the porducts Lee --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---
Re: Intermediate Table question
On Tue, Aug 4, 2009 at 11:58 AM, LeeRisqwrote: > > Does anyone know if an intermediate table can be specified on more > than two models? For instance: > > class A(m.Model): > B = ManyToManyField(B, through='D') > C = ManyToManyField(C, through='D') > > Will this validate and actually work? > > > I don't believe it would work, but even if it did, what would this do? What's the expecected behavior? Alex -- "I disapprove of what you say, but I will defend to the death your right to say it." -- Voltaire "The people's good is the highest law." -- Cicero "Code can always be simpler than you think, but never as simple as you want" -- Me --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---
Intermediate Table question
Does anyone know if an intermediate table can be specified on more than two models? For instance: class A(m.Model): B = ManyToManyField(B, through='D') C = ManyToManyField(C, through='D') Will this validate and actually work? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~--~~~~--~~--~--~---