S.Raj
S.Raj

Reputation: 1

Is it possible to generate dynamically transactionId for transaction in composer modelling language

Can I write like this -

transaction createAsset identified by transactionId { o String transactionId }

if not, then please suggest a better way.

Upvotes: 0

Views: 98

Answers (1)

Paul O'Mahony
Paul O'Mahony

Reputation: 6740

transactionId is a reserved field (it is already (implicitly) part of any transaction class you create in your model file). There is no 'identified by' syntax for Transactions FYI.

you would more likely write it as (something like - ):

transaction createAsset  { 

o String assetId
o String createdDate
o String description
--> Department dept
}

etc etc more info in the ANSWER here too:

How to resolve this error (t: Identifier cannot extend from super type) on Hyperledger Composer playground?

Upvotes: 1

Related Questions