Update code to generate diagram, it is not final fixing.
@@ -210,10 +210,14 @@ func (v *DataModelView) drawTuple(
collectionString = fmt.Sprintf("+ %s : **Set <%s>**\n", attrName, path[0])
relation = `0..*`
default:
+ if attrType.GetTypeRef() != nil {
path = attrType.GetTypeRef().GetRef().Path
collectionString = fmt.Sprintf("+ %s : **%s**\n", attrName, path[0])
relation = `1..1 `
}
+ }
+
+ if path != nil {
v.stringBuilder.WriteString(collectionString)
if !isPrimitiveList {
if _, mulRelation := relationshipMap[encEntity][v.UniqueVarForAppName(path[0])]; mulRelation {
@@ -230,6 +234,7 @@ func (v *DataModelView) drawTuple(
}
}
}
+ }
} else {
v.stringBuilder.WriteString(fmt.Sprintf("+ %s : %s\n", attrName, strings.ToLower(attrType.GetPrimitive().String())))
}
