What I had briefly discussed with malcom was using ordered tuples but switching up the defaults to use actualy field lookups.
MyModel.objects.get(pk=(1, 2)) or MyModel.objects.get(foo=1, bar=2) If we could come up with some design for multi-column fields I'm wiling to put in the work. On Wed, Aug 27, 2008 at 6:15 PM, Alberto García Hierro <[EMAIL PROTECTED]>wrote: > > > El 28/08/2008, a las 0:27, David Cramer escribió: > > > Really I'm stuck at an architectural point. > > > > I have database validation and synchronization done, and the admin > > is working. > > > > What is left is more or less handling relatedfield lookups. The > > issue is, that field's are designed to reference more than one > > field, so it's a tough design deicision to make on how that should > > be approached. > > I think the best (and the only one right) solution involves adding > multicolumn fields to Django and doing lookups with some syntax like > Model.objects.get(pk=('foo', 1)). There are other hackish approaches, > like using hash(tuple(pk[0], pk[1], ..., pk[n])) as foreign key, that > could work. However, I won't rely on them, since I'm not sure if > hash() implementation is guaranteed to be kept as is. > > On other related point, what's the status of multicolumn fields? > > Regards, > Alberto > > > > -- David Cramer Director of Technology iBegin http://www.ibegin.com/ --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django developers" group. To post to this group, send email to django-developers@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-developers?hl=en -~----------~----~----~----~------~----~------~--~---