创建具有自连接关系的Asset时出现递归错误

时间:2017-06-08 06:30:09

标签: hyperledger-composer

我已将资产定义为:

 asset PurchaseOrderAsset identified by orderId {

    o String orderId

    --> SupplierChainParticipant createdBy

    --> SupplierChainParticipant assignedTo

    o String description    

    o String status

    o Integer quantity

    o String assetId

    o PurchaseOrderAsset[] subPurchaseOrders
}

现在,当我尝试创建Asset时,我收到的错误是" InternalError:太多的递归"。我在作曲家游乐场遇到这个错误。

我们可以有自我加入关系吗?

1 个答案:

答案 0 :(得分:0)

这是一个错误,请为它创建一个问题,附上您的示例BNA。

要解决此问题,我建议您为采购订单的订单项创建concept。概念上那些" sub"采购订单不是资产,因为它们无法通过注册表进行寻址。

另请参阅:Different between 'o' and arrow symbol used in .cto file?