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

Model File - Problem #3

Open
Open
@mehulshahnj

Description

@mehulshahnj

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions