1

I am looking at the challenges in converting a codebase from using app engine patch to using django-nonrel.

I have existing data where Visit has a parent entity of a Patient. So:

class Patient(db.Model):
  ...

class Visit(db.Model):
  ...

patient = Patient(...)
visit = Visit(parent=patient, ...)

How do I continue this relationship when using only django-nonrel code? For example, how do I create a new Visit when Patient and Visit are derived from django.db.models.Model? How do I query visits, specifying the parent Patient? And so on.

I'm willing to use backend-specific interfaces.

1 Answer 1

0

I may have found an answer: unsupported. Source says:

# for now we do not support KeyFields thus a Key has to be the own
# primary key
# TODO: GAE: support parents via GAEKeyField
assert value.parent() is None, "Parents are not yet supported!"

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.