gf icon indicating copy to clipboard operation
gf copied to clipboard

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

Open lingcoder opened this issue 1 year ago • 4 comments

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 avatar Jul 25 '24 01:07 lingcoder

你这个问题有被解决吗

Sunziqi1028 avatar Jul 30 '24 01:07 Sunziqi1028

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


Has your problem been solved?

Issues-translate-bot avatar Jul 30 '24 01:07 Issues-translate-bot

你这个问题有被解决吗

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

lingcoder avatar Jul 30 '24 15:07 lingcoder

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.

Issues-translate-bot avatar Jul 30 '24 15:07 Issues-translate-bot

@lingcoder @Sunziqi1028 Sorry, I cannot reproduce this issue in latest codes. I also add more unit testing case for sqlite3 here https://github.com/gogf/gf/pull/3808

gqcn avatar Sep 25 '24 08:09 gqcn