What is the difference between o and -- in Fabric Composer

0 votes

Look at the two versions of this code:

asset Document identified by docId {
    o String docId
    o Articles[] articles
}
asset Document identified by docId {
    o String docId
    --> Articles[] articles
}

Are both correct? If yes, when should we use what?

Aug 24, 2018 in Blockchain by sabby
• 4,370 points
196 views

1 answer to this question.

0 votes

'o' indicates has-a relationship

'-->' indicates pass by reference

You could also refer to the document about CTO language:

Fabric Composer Modeling Language https://fabric-composer.github.io/reference/cto_language.html

answered Aug 24, 2018 by Perry
• 17,100 points

Related Questions In Blockchain

0 votes
1 answer

What is the difference between if() and require() statement in solidity??

If() and require() have separate functions and ...READ MORE

answered Apr 18, 2018 in Blockchain by Shashank
• 10,400 points
1,673 views
+3 votes
1 answer

What is the difference between online and offline hyperledger composer?

Hey @Renu353! Well, it's good that you ...READ MORE

answered Sep 21, 2018 in Blockchain by Omkar
• 69,150 points
309 views
0 votes
1 answer

What are the differences between chain and state database in hyperledger fabric?

There are two place which "store" data ...READ MORE

answered Jul 11, 2018 in Blockchain by Shashank
• 10,400 points
1,019 views
0 votes
2 answers

What is the difference between full node and partial node?

We need different types of nodes to ...READ MORE

answered May 30, 2019 in Blockchain by Sourav kumar
1,550 views
0 votes
1 answer
+1 vote
1 answer
0 votes
1 answer

Invalid Batch or signature in Savtooth

This will solve your problem import org.apache.commons.codec.binary.Hex; Transaction txn ...READ MORE

answered Aug 1, 2018 in Blockchain by digger
• 26,720 points
323 views
+1 vote
1 answer
0 votes
1 answer

What is the difference between ipfs and ethereum?

Blockchain and IPFS are based on similar concepts of decentralized ...READ MORE

answered Nov 14, 2018 in Blockchain by Perry
• 17,100 points
1,318 views