diff options
-rw-r--r-- | docs/05_releases.mkd | 1 | ||||
-rw-r--r-- | src/com/iciql/TableDefinition.java | 6 |
2 files changed, 6 insertions, 1 deletions
diff --git a/docs/05_releases.mkd b/docs/05_releases.mkd index b224363..e4cd9f7 100644 --- a/docs/05_releases.mkd +++ b/docs/05_releases.mkd @@ -4,6 +4,7 @@ **%VERSION%** ([zip](http://code.google.com/p/iciql/downloads/detail?name=%ZIP%)|[jar](http://code.google.com/p/iciql/downloads/detail?name=%JAR%)) *released %BUILDDATE%*
+- Fixed case-sensitivity bug on setting a compound primary key from an annotation (issue 12)
- Implemented readonly view support. (issue 8)<br/>
View models may be specified using the IQView annotation or Iciql.define(). Views can either be created automatically as part of a query of the view OR views may be constructed from a fluent statement.
- Support inheriting columns from super.super class, if super.super is annotated.<br/>This allows for an inheritance hierarchy like:<br/>
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());
}
}
|