My name is Nitia. I am still learning about DAML. I started with DAML in Doodle as an example (daml-examples/Doodle.daml at bff79195d6f685d2bc0299917db6eb294cf58c63 · entzik/daml-examples · GitHub).
There are 2 templates:
template Doodle with name: Text organizer: Party voters: [Party] options: [Text] votes: TextMap VotingSlot open: Bool where signatory organizer observer voters ensure (unique voters) && (unique options) key (organizer, name): (Party, Text) maintainer (fst key) template DoodleInvite with doodleName: Text organizer: Party voter: Party where signatory organizer observer voter key (organizer, voter, doodleName) : (Party, Party, Text) maintainer key._1
My questions are What’s the meaning of these:
" maintainer key._1" ? ._1 means what?
“create this with voters = voter::voters” ? what’s the meaning of this “::” notation?
“DA.Traversable.mapA (\voter → create DoodleInvite with doodleName = this.name, organizer = this.organizer, voter = voter) voters”
As we know in UML class diagram concept that composition is when the class really depends on other class. It means that strong ownership. How to represent a strong ownership between template in DAML code?
Sorry for the basic questions. But I really want to learn about this.
Your answer would be very useful for me.