3

I'm trying to do something similar to this: enter image description here

The only differences I have with my code are my classes are formatted with a dot, like auth.Permission:

@startuml
class auth.Permission {
+ id
+ content_type
+ codename
}


class auth.Group {
+ id
+ name
+ permissions
}

auth.Group::permissions -- auth.Permission
@enduml

As you can see, the end result is wrong: a third class is created instead of drawing the relation at the right place: https://www.plantuml.com/plantuml/uml/SoWkIImgAStDuKhEIImkLaWiBSdG2qWjoiqiBixCprEevj9Mo4m14idvUIMfUINn9PK5gM1kIcfUOcugLoqN5x9MzwByqWA4Bf0I85K0Dx0Of06XqieAIKf1LnVTVYw7rBmKeEi0

wrong output

What I'm doing wrong? Thanks.

Fuhrmanator
  • 11,459
  • 6
  • 62
  • 111
David Dahan
  • 10,576
  • 11
  • 64
  • 137

1 Answers1

6

A bit long for a comment, but how about:

@startuml
package auth {
class Permission {
+ id
+ content_type
+ codename
}


class Group {
+ id
+ name
+ permissions
}

Group::permissions -- Permission

}
@enduml

giving:

enter image description here

albert
  • 8,285
  • 3
  • 19
  • 32
  • Thanks. I thought of this solution, but was expecting to benefit from the "automatic packaging" feature (not just to be picky, but just because using `package` would require a big rework in my software which generates the puml file) – David Dahan Aug 16 '22 at 11:59
  • 1
    I can imagine that it might be a bit of a rework for you. As the original feature was not working and previously you asked for a possible workaround ... ( ;-) ) – albert Aug 16 '22 at 12:12
  • yes, thanks again :) I was secretly hopping I made some syntax mistake somewhere haha. – David Dahan Aug 16 '22 at 12:17