Skip to content
This repository has been archived by the owner on May 22, 2019. It is now read-only.

Model File - Problem #3

Open
mehulshahnj opened this issue Jun 26, 2018 · 0 comments
Open

Model File - Problem #3

mehulshahnj opened this issue Jun 26, 2018 · 0 comments

Comments

@mehulshahnj
Copy link

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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants
@mehulshahnj and others