Error reference / erDiagram

ER diagram parse error: got 'IDENTIFYING'

A relationship line uses a plain arrow or dash instead of Mermaid's crow's-foot cardinality notation, which erDiagram requires on every relationship.

Parse error on line 2:
...iagram    CUSTOMER --- ORDER : places
----------------------^
Expecting 'EOF', 'SPACE', 'NEWLINE', ... 'ENTITY_ONE', 'ZERO_OR_ONE', 'ZERO_OR_MORE', 'ONE_OR_MORE', 'ONLY_ONE', ... got 'IDENTIFYING'

Why this happens

Unlike flowcharts, erDiagram relationships aren't plain arrows -- every relationship must state cardinality on both ends using crow's-foot notation: ||, o|, }o, }|, and so on. A bare --- or --> is not valid syntax for this diagram type.

How to fix it

Pick the cardinality that matches your data model. A common one-to-many relationship reads CUSTOMER ||--o{ ORDER : places (exactly one customer, zero or more orders). Reference: || exactly one, o| zero or one, }o zero or more, }| one or more.

Broken

Fails to parse

Rendering preview...
erDiagram
    CUSTOMER --- ORDER : places

Fixed

Renders correctly

Rendering preview...
erDiagram
    CUSTOMER ||--o{ ORDER : places
Open fixed version in studio

More errors