gorm.io icon indicating copy to clipboard operation
gorm.io copied to clipboard

Update models.md to describe that non-exported fields are ignored

Open maxant opened this issue 1 year ago • 0 comments

include description that fields must be exported in order to be mapped

  • [] ONLY change English documents in the Pull Request, translations will be synced and translate them with https://translate.gorm.io/ or it will cause merge conflicts!

What did this pull request do?

schema.go doesn't inspect non-exported fields:

https://github.com/go-gorm/gorm/blob/deceebfab8c460cfee229233aded2821ac6b08eb/schema/schema.go#L204

see also https://github.com/go-gorm/gorm/issues/7251

maxant avatar Oct 23 '24 18:10 maxant