I have these two models:
class CachedRecord(models.Model):
recordname = models.CharField(max_length=100,primary_key=True)
recordcount = models.IntegerField()
def __unicode__(self):
return self.recordname
class CachedRecordData(models.Model):
record = models.ForeignKey(CachedRecord)
data = models.CharField(max_length=100)
def __unicode__(self):
return self.data
When I try to delete a CachedRecord from the admin panel I get this errror:
ProgrammingError at /admin/myapp/cachedrecord/
operator does not exist: integer = character varying
LINE 1: ...ON ( "myapp_cachedrecorddata"."record_id" = "myapp...
^
HINT: No operator matches the given name and argument type(s).
You might need to add explicit type casts.
I have found many questions (so this might be a duplicate), but I really don't understand any answer.
Where would I need to add these castings in django?