Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
kk-mats opened this issue Nov 1, 2023 · 5 comments
Assignees
Labels
bug Something isn't working

Comments

@kk-mats
Copy link

kk-mats commented Nov 1, 2023

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 kk-mats added the bug Something isn't working label Nov 1, 2023
@k1LoW
Copy link
Owner

k1LoW commented Nov 1, 2023

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?

@kk-mats
Copy link
Author

kk-mats commented Nov 4, 2023

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

@k1LoW
Copy link
Owner

k1LoW commented Nov 5, 2023

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

@k1LoW
Copy link
Owner

k1LoW commented Nov 8, 2023

Released as v1.71.1.

We've fixed it, please check it out.

@k1LoW k1LoW self-assigned this Nov 8, 2023
@fira42073
Copy link

Can this issue be closed?
cc @kk-mats

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants