[Django]-Django inserting into Oracle database invalid identifier

4👍

That is the problem, django expects a PK field named id

You can solve it easily, learn about integrate legacy databases: https://docs.djangoproject.com/en/dev/howto/legacy-databases/ .

For your code, locate primary key and inform django for it. Le’ts supose equipment_id can act as pk:

class RunableFilters(models.Model):
    equipment_id = models.BigIntegerField( primary_key=True)  #<-- here
    filter_file_name = models.CharField(max_length=255,  ...

If you have a composite pk, then, read this post: https://code.djangoproject.com/wiki/MultipleColumnPrimaryKeys

Leave a comment