From e5315f29335da4d0391994bd5b1e38bc4474925c Mon Sep 17 00:00:00 2001 From: Tom PERRILLAT-COLLOMB Date: Mon, 21 Aug 2023 23:33:42 +0200 Subject: [PATCH 1/6] feat(er): add entity name alias --- demos/er.html | 14 ++++++++++ docs/syntax/entityRelationshipDiagram.md | 28 +++++++++++++++++++ packages/mermaid/src/diagrams/er/erDb.js | 4 +-- .../mermaid/src/diagrams/er/erRenderer.js | 2 +- .../src/diagrams/er/parser/erDiagram.jison | 10 +++++++ .../src/diagrams/er/parser/erDiagram.spec.js | 9 ++++++ .../docs/syntax/entityRelationshipDiagram.md | 16 +++++++++++ 7 files changed, 80 insertions(+), 3 deletions(-) diff --git a/demos/er.html b/demos/er.html index 49f0a683f0..f1233e19f7 100644 --- a/demos/er.html +++ b/demos/er.html @@ -108,6 +108,20 @@ } MANUFACTURER only one to zero or more CAR : makes +
+ +
+    erDiagram
+      p as Person {
+        string firstName
+        string lastName
+      }
+      a as "Customer Account" {
+        string email
+      }
+      p ||--o| a : has
+    
+