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

Can't generate association tags for the dao through the gentool. #1157

Closed
TsubasaEX opened this issue Jun 14, 2024 · 1 comment
Closed

Can't generate association tags for the dao through the gentool. #1157

TsubasaEX opened this issue Jun 14, 2024 · 1 comment

Comments

@TsubasaEX
Copy link

TsubasaEX commented Jun 14, 2024

Description

I found there are use cases for the associations between two or more models, but I can get those associations and the association tags for the generated dao through the gentool.
https://gorm.io/gen/associations.html

image

Seems like there's no option to get the association tags.
https://gorm.io/gen/gen_tool.html

Here's one of the foreign keys in my generated dao model to another dao model.
image

Do I miss something here? Could you provide any suggestion?

Thanks in advance.

@qqxhb
Copy link
Member

qqxhb commented Aug 9, 2024

Gentool provides a relatively simple usage, not flexible enough.
Code generation is recommended.

https://gorm.io/gen/database_to_structs.html

@qqxhb qqxhb closed this as completed Aug 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants