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

do.XXXX struct will not work properly after setting removeFieldPrefix in config.yaml #4111

Open
zj519718645 opened this issue Jan 13, 2025 · 0 comments
Labels
bug It is confirmed a bug, but don't worry, we'll handle it.

Comments

@zj519718645
Copy link

Go version

go1.23

GoFrame version

2.8.3

Can this bug be reproduced with the latest release?

Option Yes

What did you do?

I use do.XXXX struct in my coding in Logic layer to update and insert data into db, like this:
dao.App.Ctx(ctx).Data(do.App{Name: in.Name, Description: in.Description}).InsertAndGetId()
it works very well.

Now, I need to follow coding rules of our company to set prefix 'f_' for each table's field.

What did you see happen?

Accordingly, I set removeFieldPrefix in config.yaml. Now above statement, I mean dao.Data(do.xxx).Update and dao.Data(do.xxx).Insert() can not work properly.

What did you expect to see?

The inserted record columns are null.

@zj519718645 zj519718645 added the bug It is confirmed a bug, but don't worry, we'll handle it. label Jan 13, 2025
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.
Projects
None yet
Development

No branches or pull requests

1 participant