changed the table names convection

This commit is contained in:
Luca Frosini 2021-04-12 16:46:50 +02:00
parent 8f1cbe77d7
commit 36f28b4ecb
1 changed files with 2 additions and 2 deletions

View File

@ -11,7 +11,7 @@ public class RecordToDBFields {
public static String getKey(String fieldName) {
StringBuffer stringBuffer = new StringBuffer();
int lenght = fieldName.length();
boolean lastLowerCase = true;
boolean lastLowerCase = false;
for (int i=0; i<lenght; i++) {
Character ch = fieldName.charAt(i); /*traversing String one by one*/
if (Character.isUpperCase(ch)) {
@ -38,7 +38,7 @@ public class RecordToDBFields {
protected RecordToDBFields(String typeName, Class<? extends Record> clz) throws Exception {
this.clz = clz;
this.typeName = typeName;
this.tableName = typeName.toLowerCase();
this.tableName = RecordToDBFields.getKey(typeName);
this.tableFieldToRecordField = new HashMap<>();
this.recordFieldToTableField = new HashMap<>();
mapFields();