Model File - Problem #3
Description
An extract from the CTO file provided for the challenge is shown below:
Start Extract
asset ProjectPledge identified by pledgeId {
o String pledgeId
o String name
o String decription
o Double fundsRequired
o Status status
--> AidOrg aidOrg
o Funding[] funds
}
abstract participant User {
--> ProjectPledge[] projectPledge
}
participant AidOrg identified by aidOrgId extends User {
o String aidOrgId
}
End Extract
Trying to add an AidOrg via Loopback complains the AidOrg cannot be added because there is no ProjectPledge. As you can see AidOrg extends User which references ProjectPledge. A ProjectPledge cannot be added because there is no AidOrg. This is a circuitous loop. Tried changing the AidOrg reference on ProjectPledge to optional but still does not work. Works OK though with the online playground but that is not good enough, need loopback to build out the app that will interact with the blockchain.