我正在尝试使用 Pony ORM 创建一个一对一的映射。
class ApplierIngress(ApplierObjectMapper.db.Entity):
correlation_id = orm.PrimaryKey(str)
ticket_number = orm.Required(str)
username = orm.Required(str)
status = orm.Required(str)
request_date = orm.Required(datetime)
class ApplierResult(ApplierObjectMapper.db.Entity):
correlation_id = orm.Required(ApplierIngress)
result = orm.Required(orm.LongStr)
request_date = orm.Required(datetime)
生成映射时抛出错误
pony.orm.core.ERDiagramError: Reverse attribute for ApplierResult.correlation_id not found
我希望 ApplierResult 表中的 correlation_id 是引用 ApplierIngress 表中的 correlation_id 的外键
请让我知道我做错了什么?