aboutsummaryrefslogtreecommitdiffstats
path: root/src/com/iciql/TableDefinition.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/com/iciql/TableDefinition.java')
-rw-r--r--src/com/iciql/TableDefinition.java6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/com/iciql/TableDefinition.java b/src/com/iciql/TableDefinition.java
index aa25722..de2b9ed 100644
--- a/src/com/iciql/TableDefinition.java
+++ b/src/com/iciql/TableDefinition.java
@@ -209,9 +209,13 @@ public class TableDefinition<T> {
*/
private void setPrimaryKey(List<String> columnNames) {
primaryKeyColumnNames = Utils.newArrayList(columnNames);
+ List<String> pkNames = Utils.newArrayList();
+ for (String name : columnNames) {
+ pkNames.add(name.toLowerCase());
+ }
// set isPrimaryKey flag for all field definitions
for (FieldDefinition fieldDefinition : fieldMap.values()) {
- fieldDefinition.isPrimaryKey = this.primaryKeyColumnNames.contains(fieldDefinition.columnName);
+ fieldDefinition.isPrimaryKey = pkNames.contains(fieldDefinition.columnName.toLowerCase());
}
}