Hi Everyone, I have a scenario where one field needs to be a primary key and another field needs to be an AutoField....and Autofield requires a condition primary_key = true
I get this error django_reports.MstCompositionFm.makeid: (fields.E100) AutoFields must set primary_key=True. django_reports.MstSalarystructure: (models.E026) The model cannot have more than one field with 'primary_key=True' This is my case: icatid = models.BigIntegerField(db_column='ICatID', primary_key=True) makedate = models.DateTimeField(db_column='MakeDate') revdate = models.DateTimeField(db_column='RevDate', blank=True, null=True) makeid = models.BigAutoField(db_column='MakeId', primary_key=False) It would be of great help if anyone could figure out whats the solution Thanks in Advance, Rakhee -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/django-users. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/341d511d-3c95-42b9-a22f-a5fa0c331da5%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.

