django admin与djongo db连接器内联时遇到错误

django admin与djongo db连接器内联时遇到错误,django,djongo,Django,Djongo,我使用的是ArrayReferenceField而不是ManyToManyField,因为我使用的是djongo作为数据库连接器。我希望这个字段在django管理站点中显示为内联模型。但是我得到了一个错误,AttributeError:'ArrayReferenceDescriptor'对象没有“通过”属性。。我知道,ArrayReferenceField不会在数据库中创建中间模型。那么,如何在django管理中成功地将此字段显示为内联字段呢 我的模型: class Synonym(models

我使用的是
ArrayReferenceField
而不是
ManyToManyField
,因为我使用的是
djongo
作为数据库连接器。我希望这个字段在django管理站点中显示为内联模型。但是我得到了一个错误,
AttributeError:'ArrayReferenceDescriptor'对象没有“通过”属性。
。我知道,
ArrayReferenceField
不会在数据库中创建中间模型。那么,如何在django管理中成功地将此字段显示为内联字段呢

我的模型:

class Synonym(models.Model):
    base_name = models.CharField(
        blank=False,
        max_length=5000,
        verbose_name='Base Entity Value',
        help_text='The entity value for which you want to provide the synonym.',
    )

    extra_name = models.CharField(
        blank=False,
        max_length=5000,
        verbose_name='A synonym',
        help_text='Synonyms of the base entity value.',
    )

    class Meta:
        # abstract = True
        ordering = ['base_name']

    def __str__(self):
        return self.base_name

class qa(DirtyFieldsMixin, models.Model):
    synonyms = models.ArrayReferenceField(
        blank=True,
        null=True,
        to=Synonym,
        on_delete=models.SET_NULL,
        help_text='Synonyms of the entities of the question.',
    )
在admin.py中:

class SynonymInline(admin.TabularInline):
    model = qa.synonyms.through


class SynonymAdmin(admin.ModelAdmin):
    inlines = [
        SynonymInline,
    ]


@admin.register(qa)
class qaAdmin(admin.ModelAdmin):
    # form = qaModelForm

    list_display = ('question', 'answer', 'module', 'intent', 'display_entities_name')

    list_filter = ('module', 'intent', 'username',)

    inlines = [
        SynonymInline,
    ]