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
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.