One-to-one relationship

In order to create a one-to-one relationship, the relationship attributes should be defined as Optional-Required or as Optional-Optional:

  1. class Person(db.Entity):
  2. passport = Optional("Passport")
  3. class Passport(db.Entity):
  4. person = Required("Person")

Defining both attributes as Required is not allowed because it doesn’t make sense.