changed the table names convection
This commit is contained in:
parent
8f1cbe77d7
commit
36f28b4ecb
|
@ -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();
|
||||
|
|
Loading…
Reference in New Issue