naming_strategy only works with strings
- Dominant language
- Groovy
- Stars
- 2.9k
- Forks
- 975
- Avg merge
- 1d 22h
- Merged PRs (30d)
- 92
Description
Hey there,
According to documentation [here](https://grails.github.io/grails-doc/3.0.x/guide/GORM.html#customNamingStrategy), there are 3 options available to provide a custom naming strategy. However it appears to only work when I use a String for the classname.
https://github.com/grails/grails-data-mapping/blob/master/grails-datastore-gorm-hibernate4/src/main/groovy/grails/orm/bootstrap/HibernateDatastoreSpringInitializer.groovy
`def namingStrategy = config.getProperty("hibernate${suffix}.naming_strategy") ?: ImprovedNamingStrategy`
`getProperty` may be the problem? Will only return strings, null for anything else.
Thanks
Contributor guide
Research direction
Read grails-datastore-gorm-hibernate4/src/main/groovy/grails/orm/bootstrap/HibernateDatastoreSpringInitializer.groovy and the linked custom naming strategy documentation. Start at the hibernate naming_strategy configuration lookup and verify how non-string values are handled. Done means the documented naming-strategy options work when configured with a class rather than only a String.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- groovy
- Domain
- database
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100