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

Added useCamelCaseNameWithoutInsertions #394

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

AustrianDudes
Copy link

I am currently working on several apps where I use greenDao to access a Sqlite database created by another module. This database does not include underscores in table and property names which consist of more than one word e.g. DELETEDDATE.

A solution for this issue would be to not use camel casing in the code’s table and property names e.g. addDateProperty("Deleteddate"), but this looks weird and does not fall in line with Google’s Java Style Guide Chapter 5.2.5 (https://google.github.io/styleguide/javaguide.html).

Another solution would be to use camel casing in the code’s table and property names and additionally specify the database naming e.g. addDateProperty("DeletedDate").columnName("DELETEDDATE"), but this approach is quite a hassle for a large amount of tables and properties (I can provide you with some examples).

Thus I implemented the possibility to generally switch off the underscore insertion for table and property names.

Schema schema = new Schema(1, "com.demo.green");
schema.enableCamelCaseNameWithoutInsertions();

Feel free to accept the pull request if you like the changes, or ask me for further information.

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

Successfully merging this pull request may close these issues.

None yet

1 participant