diff --git a/cypress/integration/rendering/erDiagram.spec.js b/cypress/integration/rendering/erDiagram.spec.js index 28c6191c8e..578f5a3984 100644 --- a/cypress/integration/rendering/erDiagram.spec.js +++ b/cypress/integration/rendering/erDiagram.spec.js @@ -305,4 +305,21 @@ ORDER ||--|{ LINE-ITEM : contains {} ); }); + + it('should render entities with entity name aliases', () => { + imgSnapshotTest( + ` + erDiagram + p[Person] { + varchar(64) firstName + varchar(64) lastName + } + c["Customer Account"] { + varchar(128) email + } + p ||--o| c : has + `, + { logLevel: 1 } + ); + }); }); diff --git a/demos/er.html b/demos/er.html index 65e3049c8c..6b23d6b329 100644 --- a/demos/er.html +++ b/demos/er.html @@ -110,6 +110,20 @@ } MANUFACTURER only one to zero or more CAR : makes +
+ +
+    erDiagram
+      p[Person] {
+          string firstName
+          string lastName
+      }
+      a["Customer Account"] {
+          string email
+      }
+      p ||--o| a : has
+    
+