tbls icon indicating copy to clipboard operation
tbls copied to clipboard

One-to-one relations are incorrectly exported as one-to-many in mermaid diagram

Open kk-mats opened this issue 1 year ago • 4 comments

What happened

Write tbls.yml to set one-to-one relations to tables without foreign keys and create a mermaid er diagram by tbls. However, the tables were in one to many relations in exported diagram.

What you expected to happened

Exported as one to one in mermaid diagram if one to one relations are set in tbls.yml.

What stack trace or error message from tbls did you see?

No errors were shown.

Anything else we need to know?

Environment

  • tbls version: Tried 1.60, 1.62, 1.70 but not resolved.
  • Database version: MySQL 5.7
  • OS ( Ubuntu bionic, macOS Calalina, WSL2, etc ): WSL2
  • Shell ( bash, zsh, poworshell, etc ): Bash
  • Stacktrace or error message from tbls ( If you can, set DEBUG=1)
  • Config ( .tbls.yml )

kk-mats avatar Nov 01 '23 13:11 kk-mats

Hi @kk-mats. Thank you for your report. Could you give us the schema and .tbls.yml to reproduce the situation, and the diagram to expect?

k1LoW avatar Nov 01 '23 13:11 k1LoW

I added an example code here that reproduces this issue. https://github.com/kk-mats/tbls-issue-534

kk-mats avatar Nov 04 '23 12:11 kk-mats

@kk-mats GREAT!!!! Thank you!!!!!

k1LoW avatar Nov 05 '23 07:11 k1LoW

Released as v1.71.1.

We've fixed it, please check it out.

k1LoW avatar Nov 08 '23 00:11 k1LoW