Malcolm Tredinnick skrev: > On Tue, 2007-08-21 at 21:21 -0700, Catriona wrote: > >> What I have is an event which has about 12 fields. Optionally any >> combination of a single weather record, a single event detail record, >> a single survey record and one of four event subclass records may be >> stored against this event. Each of these optional records has between >> 5 and 12 fields each. I could put everything in one big table with >> lots of nullable fields but that is not my preferred option. >> > > You can fake it with a ForeignKey, since that only allows one entry on > the source model's end. The slight drawback is that each target instance > (say, an event detail record) is not prohibited from being linked from > two different event models by the database. Some checking in the save() > method could fake this for you, though.
Shouldn't unique=True on the ForeignKey fix that problem? Nis --~--~---------~--~----~------------~-------~--~----~ 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?hl=en -~----------~----~----~----~------~----~------~--~---