ObeoNetwork / UML-Designer

OpenSource (EPL licensed) UML2 Graphical Modelers (Class, Composite, State, Activity, Sequence ...)
http://umldesigner.org
320 stars 123 forks source link

Invalid code for generated setter in case of 0..1 cardinality #883

Closed Johann-Angeli closed 7 years ago

Johann-Angeli commented 8 years ago

When generating classes from a model with relationships having a 0..1 cardinality, The associated setter is badly generated.

Changing the cardinality from 0..1 to 0..* solves the problem.

The model image

The generated source code of the Vehicle class with 0..1 cardinality image

The generated source code of the Vehicle class with 0..* cardinality image

Environment