1

我有

class MyModel:
relations = models.ManyToManyField('MyModel', related_name = 'relations_reverse')

我想补充一下constraint,这将强制两端不能相同object。(即,myVar1 - myVar2 can be related but not myVar1 - myVar1

4

0 回答 0