Need help with duplicate names of map objects and map like properties for classes

0 votes
asked Oct 8 in Question / help by Binnesteboezoe

https://imgur.com/1r7vx5w

Code:

@startuml

left to right direction

map 1 {

  dirkRek =>

  emmaRek =>

  dirkSaldo1 => 105.00

  dirkSaldo2 => 105.00

}

map Rekening {

  naam => "D. Postma"

  nummer => 606575

  saldo => 105.00

}

map Rekening2 {

  naam => "D. Postma"

  nummer => 606575

  saldo => -45.00

}

1::dirkRek --> Rekening

1::emmaRek --> Rekening2

@enduml

-----------------------------------------------------------------------------------------------------------------------------------------------------

How would i go about having the third map "Rekening2" be renamed to "Rekening" like the previous map (already tried "map "Rekening2" as Rekening but that seems to only work with classes), and how would i be able to have the map "1" be nameless OR have it be a class and have those same seperated lines like a map has with =>

1 Answer

0 votes
answered Oct 8 by albert (3,480 points)

I thin usage of the construct

map "name" as label

will do the trick, like:

@startuml

left to right direction

map 1 {

  dirkRek =>

  emmaRek =>

  dirkSaldo1 => 105.00

  dirkSaldo2 => 105.00

}

map "Rekening" as R1 {

  naam => "D. Postma"

  nummer => 606575

  saldo => 105.00

}

map "Rekening" as R2 {

  naam => "D. Postma"

  nummer => 606575

  saldo => -45.00

}

1::dirkRek --> R1

1::emmaRek --> R2

@enduml

...