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

Problem with generated Bean and field names #108

Open
carmas123 opened this issue Feb 14, 2019 · 3 comments
Open

Problem with generated Bean and field names #108

carmas123 opened this issue Feb 14, 2019 · 3 comments

Comments

@carmas123
Copy link

Hi I start to use Jaguar ORM for my app and I start from an existing database with some table structure and field names with upper cases and without "_" (underscores) fields name.
Now when I try to make my bean with a simple field name like "myName" it is translated to "my_name".
This is a big problem when we start to work from an existing database. I think that we can add an annotation to skip the field name translation for all bean, all generation or a single column.
I see that we can do that simply editing the "writer.dart" file into _camToSnak function.

Please can you help me please?

@tejainece
Copy link
Member

Will fix this.

@carmas123
Copy link
Author

Thank you

@tejainece
Copy link
Member

I think by default, we should prefer snake case. But for special cases like this, we should allow skipping snaking casing with a flag.

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

2 participants