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

How to indicate a bool field may be nil in ORM dao generation? #2829

Closed
chamhaw opened this issue Aug 2, 2023 · 2 comments
Closed

How to indicate a bool field may be nil in ORM dao generation? #2829

chamhaw opened this issue Aug 2, 2023 · 2 comments

Comments

@chamhaw
Copy link

chamhaw commented Aug 2, 2023

1. What version of Go and system type/arch are you using?

go version go1.20.4 darwin/arm64

2. What version of GoFrame are you using?

v2.4.1

3. Can this issue be re-produced with the latest release?

yes

4. What did you do?

Added a colume to a table then used make dao

 `code_scan` bit(1) DEFAULT NULL

5. What did you expect to see?

 CodeScan *bool

Wanna distinguish between nil and false.

6. What did you see instead?

CodeScan bool

@gqcn
Copy link
Member

gqcn commented Oct 7, 2023

@chamhaw If nil, the bool filed is considered false. What is your business scenario that needs distinguish nil and false?

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Nov 13, 2023
@chamhaw
Copy link
Author

chamhaw commented Nov 21, 2023

@chamhaw If nil, the bool filed is considered false. What is your business scenario that needs distinguish nil and false?

It mostly such as radios. The available options may be checked,unchecked, not-configured. The latter option explicitly means no user prompt and a system wide default value may be provided. Either checked or unchecked is possible. @gqcn

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants