Skip to content
New issue

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

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

Already on GitHub? # to your account

When multiple databases are configured with clear: true, command gen dao will cleared the previous entity. #2572

Closed
b1lz9 opened this issue Apr 12, 2023 · 1 comment
Assignees
Labels
bug It is confirmed a bug, but don't worry, we'll handle it. done This issue is done, which may be release in next version.

Comments

@b1lz9
Copy link

b1lz9 commented Apr 12, 2023

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

go version go1.19.1 darwin/arm64

2. What version of GoFrame are you using?

CLI Built Detail:
  Go Version:  go1.17.13
  GF Version:  v2.3.2
  Git Commit:  2023-02-15 14:13:32 ad737ded3cd1354cb6f4208f11fcd8f99f94c5f3
  Build Time:  2023-02-15 14:17:00

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

4. What did you do?

This's my config.yaml

gfcli:
  gen:
    dao:
      - link: "mysql:root:12345678@tcp(localhost:3306)/cc_sys"
        tables: ""
        removePrefix: "s_,u_,c_,w_"
        descriptionTag: true
        noModelComment: true
        group: "sys"
        clear: true
        overwriteDao: true
      - link: "mysql:root:12345678@tcp(localhost:3306)/cc_book"
        tables: ""
        removePrefix: ""
        descriptionTag: true
        noModelComment: true
        group: "book"
        clear: true
        overwriteDao: true

I added clear: true to each databaes configuration.

When I use gen dao . Only the entity configured at the bottom will be retained, and all previous ones will be cleard.

5. What did you expect to see?

I hope that even if clear: true is configured for each database, the previous entity will not be cleard.

6. What did you see instead?

@b1lz9 b1lz9 changed the title When multiple databases are configured with clear: true, commond gen dao will overwrite the previous entity. When multiple databases are configured with clear: true, command gen dao will overwrite the previous entity. Apr 12, 2023
@b1lz9 b1lz9 changed the title When multiple databases are configured with clear: true, command gen dao will overwrite the previous entity. When multiple databases are configured with clear: true, command gen dao will cleared the previous entity. Apr 12, 2023
@gqcn gqcn added the bug It is confirmed a bug, but don't worry, we'll handle it. label Aug 21, 2023
@gqcn gqcn self-assigned this Feb 4, 2024
@gqcn gqcn added wip done This issue is done, which may be release in next version. and removed wip labels Feb 4, 2024
gqcn added a commit that referenced this issue Feb 4, 2024
@gqcn
Copy link
Member

gqcn commented Feb 4, 2024

#3301

@gqcn gqcn closed this as completed Feb 4, 2024
gqcn added a commit that referenced this issue Feb 5, 2024
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
bug It is confirmed a bug, but don't worry, we'll handle it. done This issue is done, which may be release in next version.
Projects
None yet
Development

No branches or pull requests

2 participants