beyondcode/laravel-er-diagram-generator

recurring problem with underscores

Closed this issue · 2 comments

b-cil commented

Hi there,

I have plenty of model named using _ especially type prefix_model.

Laravel er diagram do not work on it. It seems they are transformed into - (using the output in txt format) which cannot be read or is causing problem to graphviz.

How could this be solved.

b-cil commented

as an example I have Inbox_message and inbox_thread. The text input is the following :

appinbox-message:thread_id -> appinbox-thread:id [
label=" "
xlabel="HasOne
thread"
color="#D62828"
penwidth="1.8"
fontname="Helvetica Neue"
dir="both"
arrowhead="tee"
arrowtail="none"
]

The Graphwviz gives the error syntax error in line 215 near '-'

If I change manually the - to _ then it works (using https://dreampuf.github.io/GraphvizOnline/)

Hi @b-cil,

Can you pull my PR #41 and see if that PR fixes your problem?

Thanks