[Answer]-Django Models: Should a relatives model refer to itself through ForeignKey or ManyToMany?

1๐Ÿ‘

โœ…

if a class's field points to the same class, will this be an issue?

this is not an issue and most sql databases support this. Read more on self-joins to understand this.

maybe I should use ManyToManyField?

yes, manytomany is the way to go forward as one person can have many relatives & he himself can be the relative of many others.

๐Ÿ‘คuser2879704

Leave a comment