1
我正在研究將代碼庫從使用app engine patch轉換爲使用django-nonrel時面臨的挑戰。如何用django-nonrel中的Django功能替換應用程序引擎的「父」字段?
我有現有的數據,其中Visit有parent entity患者。所以:
class Patient(db.Model):
...
class Visit(db.Model):
...
patient = Patient(...)
visit = Visit(parent=patient, ...)
如何在僅使用django-nonrel代碼時繼續這種關係?例如,當患者和訪問來自django.db.models.Model時,如何創建新的訪問?如何查詢訪問,指定父患者?等等。
我願意使用後端特定的接口。