-
-
Notifications
You must be signed in to change notification settings - Fork 23
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
Velocity function to camelCase a string #22
Comments
Telosys is extensible by design, so the simplest way to do this kind of conversion is to create your own specific function and to use it in your templates. Here's how you can do that :
Static method example
Standard method example
You can find class loading examples in the "advanced-templates-samples" templates bundle : |
Is there any resources we can reference? Cannot load the class after placing in the lib or templates folder |
FYI, if there is package wrap for the class, the file structure need to be followed. e.g com.example.Util |
An example of specific Java classes is available in this bundle of templates : Please don't use issues to ask questions (use StackOverflow instead). |
Hello and thanks for this wonderful tool.
I looked around for a function that can convert a
string_with_underscores
to a camelCase formatstringWithUnderscores
, but I cannot seem to find such a function.Is there such a function? How easy it would be to submit a pr to add it?
Why, you'd ask?
Because if field name have a prefix (
personal_computer_model
,personal_computer_ram
, etc) matching the catalog name (personal_computer
), then when auto-generating an entity, there's no need to have the properties named:personalComputerModel
personalComputerRam
but rather, just:
model
ram
and the class would be named:
personalComputer
.Makes sense? :)
The text was updated successfully, but these errors were encountered: