Skip to content

Commit 59381eb

Browse files
committed
add todo and show cardinality
1 parent 6a377af commit 59381eb

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

packages/compass-data-modeling/src/components/diagram-editor.tsx

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -186,8 +186,8 @@ const DiagramEditor: React.FunctionComponent<{
186186
id: relationship.id,
187187
source: source.ns,
188188
target: target.ns,
189-
markerStart: 'one',
190-
markerEnd: 'many',
189+
markerStart: source.cardinality === 1 ? 'one' : 'many',
190+
markerEnd: target.cardinality === 1 ? 'one' : 'many',
191191
};
192192
});
193193
}, [model?.relationships]);
@@ -209,9 +209,10 @@ const DiagramEditor: React.FunctionComponent<{
209209
? 'Unknown'
210210
: typeof field.bsonType === 'string'
211211
? field.bsonType
212-
: field.bsonType[0];
212+
: // TODO: Show possible types of the field
213+
field.bsonType[0];
213214
return {
214-
name: name,
215+
name,
215216
type,
216217
glyphs: type === 'objectId' ? ['key'] : [],
217218
};

0 commit comments

Comments
 (0)