2π
β
but this seems incorrect to me because the Relationship model does not represent an object but a relation between other objects.
A relationship is a first-class thing.
In a simple RDBMS models, the relationship was implied by a shared key (FK in one, PK in another)
However, when you have many-to-many association tables, you create an explicit row which embodies the relationship.
Youβre just enriching the association object with additional attributes.
This is fine. Itβs common, in fact.
Itβs a generalization of this: https://docs.djangoproject.com/en/1.3/topics/db/models/#many-to-many-relationships
Also, read this: https://docs.djangoproject.com/en/1.3/topics/db/models/#extra-fields-on-many-to-many-relationships
π€S.Lott
Source:stackexchange.com