Hi all,

I read a post dating back to 2007 telling we can create a multiple
primary key using

" class Meta:
        unique_together = (('field1', 'field2'),) "

in a model like

class MyModel(models.Model):
    field1 = ForeignKey('table1', db_index=True)
    field2 = ForeignKey('table2', db_index=True)

   class Meta:
        unique_together = (('field1', 'field2'),)

Is there any updated solution? How do you do this you guys? I really
need multiple keys...

thx

Arbi
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to