go-gorm / gorm

The fantastic ORM library for Golang, aims to be developer friendly
https://gorm.io
MIT License
37.02k stars 3.94k forks source link

Allow session config naming override #7220

Closed AdamDrewsTR closed 1 month ago

AdamDrewsTR commented 1 month ago

What did this pull request do?

Allows naming strategy to change on the fly. This is helpful when you may want to dynamically alter the naming strategy for individual struct without changing the behavior everywhere.

User Case Description

Change naming strategy for individual structs/db transactions/sessions.

jinzhu commented 1 month ago

Hi @AdamDrewsTR

Since we cache the generated values for each model, this may not work in some cases.