Skip to content
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

Add option to underscore field/table names #74

Open
gene-pavlovsky opened this issue Feb 22, 2019 · 0 comments
Open

Add option to underscore field/table names #74

gene-pavlovsky opened this issue Feb 22, 2019 · 0 comments

Comments

@gene-pavlovsky
Copy link
Member

Currently it's possible to give custom names to tables. However, it's a bit tedious compared to the automatic naming. I didn't see a possibility to give custom names to fields.

Personally I prefer the tables and fields to be all-lowercase with underscores to separate words.
It would be nice to have a compile-time flag that would select the style of table/field name generation.
The current style would then be the default one to maintain backwards compatibility with existing code. Other styles like the one I proposed would be possible to select when compiling, e.g. -Dtink_sql_naming=lowercase_underscore

This would remove the need to manually redefine table names
@:table("post_tags") var postTags:PostTags;
And it would also apply to field names, e.g. firstName field in haxe would map to first_name field in the database.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant