aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJames Moger <james.moger@gitblit.com>2014-11-03 08:17:30 -0500
committerJames Moger <james.moger@gitblit.com>2014-11-03 12:51:16 -0500
commit0fd12a7004a40d8dd1f1857e791c23d31267ac1f (patch)
treea01e494de188fa5eaf04698b813b6adb444deb59 /src
parent97b542aa654ccc4eb47b313de9078bdfabbe727b (diff)
downloadiciql-0fd12a7004a40d8dd1f1857e791c23d31267ac1f.tar.gz
iciql-0fd12a7004a40d8dd1f1857e791c23d31267ac1f.zip
Foreign key test must reference a unique row
Diffstat (limited to 'src')
-rw-r--r--src/test/java/com/iciql/test/models/CategoryAnnotationOnly.java7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/test/java/com/iciql/test/models/CategoryAnnotationOnly.java b/src/test/java/com/iciql/test/models/CategoryAnnotationOnly.java
index b96ab04..2c01afa 100644
--- a/src/test/java/com/iciql/test/models/CategoryAnnotationOnly.java
+++ b/src/test/java/com/iciql/test/models/CategoryAnnotationOnly.java
@@ -22,14 +22,16 @@ import java.util.List;
import com.iciql.Iciql.IQColumn;
import com.iciql.Iciql.IQContraintUnique;
+import com.iciql.Iciql.IQIndex;
import com.iciql.Iciql.IQTable;
+import com.iciql.Iciql.IndexType;
/**
* A table containing category data.
*/
@IQTable(name = "AnnotatedCategory", primaryKey = "id")
-// @IQIndex(value = "categ", type=IndexType.UNIQUE)
+@IQIndex(value = "categ", type=IndexType.UNIQUE)
@IQContraintUnique(uniqueColumns = { "categ" })
public class CategoryAnnotationOnly {
@@ -53,7 +55,7 @@ public class CategoryAnnotationOnly {
}
public static List<CategoryAnnotationOnly> getList() {
- CategoryAnnotationOnly[] list = {
+ CategoryAnnotationOnly[] list = {
create(1, "Beverages"),
create(2, "Condiments"),
create(3, "Produce"),
@@ -63,6 +65,7 @@ public class CategoryAnnotationOnly {
return Arrays.asList(list);
}
+ @Override
public String toString() {
return category;
}