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

cli: Use the gf gen dao command to generate sqlite entities, and the results are all empty structures. #3706

Closed
lingcoder opened this issue Jul 25, 2024 · 5 comments
Labels
bug It is confirmed a bug, but don't worry, we'll handle it. cannot reproduce We cannot reproduce it, it might resolved in new version or you should give more details.

Comments

@lingcoder
Copy link
Contributor

lingcoder commented Jul 25, 2024

Go version

go version go1.22.4 windows/amd64

GoFrame version

2.7.2

Can this bug be reproduced with the latest release?

Option Yes

What did you do?

切换到项目app/demo/文件夹下,执行:gf gen dao

hack配置如下

gfcli:
    gen:
    dao:
      - link: "sqlite:./mydb.db?cache=shared&mode=rwc"
        tables: "table_demo"
        descriptionTag: true
        noModelComment: true
        overwriteDao: true
        importPrefix: "demo-project/app/demo/internal"
        stdTime: true
        typeMapping:
          decimal:
            type:   decimal.Decimal
            import: github.com/shopspring/decimal

What did you see happen?

7fa732ab33b44f440645c1263fcc316

What did you expect to see?

生成正常的实体结构体

@lingcoder lingcoder added the bug It is confirmed a bug, but don't worry, we'll handle it. label Jul 25, 2024
@Issues-translate-bot Issues-translate-bot changed the title cli: 使用gf gen dao 命令生成sqlite 实体,结果生成的全是空结构 cli: Use the gf gen dao command to generate sqlite entities, and the results are all empty structures. Jul 25, 2024
@Sunziqi1028
Copy link

你这个问题有被解决吗

@Issues-translate-bot
Copy link

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


Has your problem been solved?

@lingcoder
Copy link
Contributor Author

lingcoder commented Jul 30, 2024

你这个问题有被解决吗

没有呢。导入到mysql中后,再执行gf gen dao 临时解决的

@Issues-translate-bot
Copy link

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


Has your problem been solved?

no. After importing into mysql, execute gf gen dao for temporary solution.

@gqcn gqcn added the cannot reproduce We cannot reproduce it, it might resolved in new version or you should give more details. label Sep 25, 2024
@gqcn
Copy link
Member

gqcn commented Sep 25, 2024

@lingcoder @Sunziqi1028 Sorry, I cannot reproduce this issue in latest codes. I also add more unit testing case for sqlite3 here #3808

@gqcn gqcn closed this as completed Sep 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug It is confirmed a bug, but don't worry, we'll handle it. cannot reproduce We cannot reproduce it, it might resolved in new version or you should give more details.
Projects
None yet
Development

No branches or pull requests

4 participants