Closed ozum closed 2 years ago
This appears to still be an issue. :( I'm looking to diagram MongoDB style model which can have nested entities.
I think @weedySeaDragon could speak more on this but it seems like this feature has been removed
https://github.com/jcdang/mermaid/commit/4bedc49b4dc3575c068432b5d90292ad4ab57494 https://github.com/jcdang/mermaid/commit/3c1bad17925af484949e6c0eb91981ba36cfb2f5
@ozum has mentioned
"public.product" ||--o{ "public.product_color" : label
works
I think the approach going forward is to use AS
alias but it still has an issue.
erDiagram
public_product AS "public.product" {
}
public_product_color AS "public.product_color" {
}
public_product ||--o{ public_product_color : label
I checked the code:
entity name:
"
) around an entity name if you want anything other than letters (alpha: A-Za-z) or numbers (0-9) in the name[]
), but that's not currently implemented.entity attributes:
*
), square brackets ([]
), and parentheses (()
) are allowed. (This is the regexp:[\*A-Za-z_][A-Za-z0-9\-_\[\]\(\)
). No spaces or period or quotes are allowed.@jcdang and @zomgbre - If you need something else (like spaces or other characters in the attributes), I encourage you to submit a feature request.
Thanks for the response @weedySeaDragon. Do these features need to go through some roadmap acceptance process? I would like to help but I would need to know the syntax direction so I can make appropriate changes to the grammar. I've seen multiple ways of doing aliases in mermaid and I believe it would make things easier to have a consistent escape pattern to have this feature done across all diagram models.
@jcdang I agree that having standardized ( and DRY) grammar parts would be helpful.
I know that work is being done to use langium and to pull out those common and standardized parts. And also that backward compatibility is important.
Issue #4401 has the overview and initial discussions. Look at the linked/referenced issues and PRs to see initial work.
There is a core goup of contributors that will review proposed implementations. You can open up an issue and describe a proposed solution and when that is reviewed, your solution can be discussed.
I can't use dot character (
.
) in ERD diagrams.To Reproduce Open live editor and put code below:
or
Got error:
Expected behavior I expected using quotes around text solve the problem.