I'm trying to figure out how to manually create entries in a database where one table has multiple fields related to other tables. What I've tried to do does create the tables ... partially. Because there are other hidden "relationship" tables, I'm not sure how I'm supposed to populate those other tables.
This question is a bit hard to explain, so let me try with the following very rough example (rough and not totally correct code!). class A class B class C a=meta.ForeignKey(A) b=meta.ManyToManyField(B) In my code I do (again, VERY roughly!) p=app.A() # to create an A p.save() q=app.B() # to create a B q.save() and then r=app.C() # to create a C r.a = p.id # to relate to the A r.b = q.id # and to realte to the B r.save() The problem is, if I later do something with A's or B's get_c_list() or get_c_count(), they're not there. The standard add_foo() only would seem to work when there's one relation -- or at least, I didn't try it when there are multiple relations... So, what's the "Django Way" to do this? Whew... I hope that was clear enough... -- Glenn Tenney --~--~---------~--~----~------------~-------~--~----~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users -~----------~----~----~----~------~----~------~--~---