-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Name Utils underscoreSeparate method adds extra underscores to the beginning of strings when starting with underscore #10140
Comments
To note the further issue this causes is that when you name a column on a micronaut-data entity something like @column(name = "_my_column_name") |
For those who run into this issue, you can override the PhysicalNamingStrategy like this with the fix in it.
|
Actually, the expected result should be |
… is the separator char results in a double separator char prefix. Also overload the method to support a lowercase result. fixes #10140
Expected Behavior
underscoreSeparate("_nameOfThing") should result in "_name_of_thing" but actually results in "__name_of_thing"
Actual Behaviour
String prepended with an underscore result in double underscore prepended strings
Steps To Reproduce
Note I looked for unit tests for this method and there aren't any or I would have commented that you could add one to a test case. The private method beneath this method is the real problem specifically these lines
Environment Information
No response
Example Application
No response
Version
4.2.0
The text was updated successfully, but these errors were encountered: