David Dahan
David Dahan

Reputation: 11162

PlantUML: Unexpected result with "Arrows from/to class members"

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.

Upvotes: 3

Views: 633

Answers (1)

albert
albert

Reputation: 9037

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

Upvotes: 6

Related Questions