如何在mongoengine中使用referencefield引用本类

引用:原文

from mongoengine import *

class Employee(Document):
    name = StringField()
    boss = ReferenceField("self", reverse_delete_rule = NULLIFY)
posted @ 2019-08-17 17:45  darylc  阅读(978)  评论(0编辑  收藏  举报