How does Corda support parent-child relationship

前端 未结 1 843
陌清茗
陌清茗 2021-01-27 10:45

How does Corda support parent-child relationship between states ( i.e. one parent state to many child states that serve different purposes ) One-To-Many Relationship. Currently

相关标签:
1条回答
  • 2021-01-27 11:13

    Just reference the child states in the parent state by their linearId, or vice-versa.

    You can then impose rules in the contract - for example, you can require that a transaction marking a purchase contract as Settled is also transferring all the items from the seller to the buyer.

    Let me know if the use-case evolves and this model is no longer appropriate.

    0 讨论(0)
提交回复
热议问题