I have two models A and B where
class B(Model):
As = models.ManyToManyField(A)
Then I do the following
a_instance.b_set.clear()
in order to remove all references from a_instance to any b_instances. But then I've got the following error:
Database Error: column a_b/id doesn not exists
Line 1: SELECT "a_b"."id",
And this is true, my intermediate table a_b in many-to-many relationship (between A and B) doesn't have field named id. It has two other fields instead a_id and b_id.
So does anyone knows how can I force Django to use a_id and b_id instead of just id?