]> source.dussan.org Git - iciql.git/commitdiff
Foreign key test must reference a unique row
authorJames Moger <james.moger@gitblit.com>
Mon, 3 Nov 2014 13:17:30 +0000 (08:17 -0500)
committerJames Moger <james.moger@gitblit.com>
Mon, 3 Nov 2014 17:51:16 +0000 (12:51 -0500)
src/test/java/com/iciql/test/models/CategoryAnnotationOnly.java

index b96ab0408b10be4f0550d3af3a2fe8b5c4277db4..2c01afa1ace5362ff366ac2c7f1a01c329fb7fff 100644 (file)
@@ -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;
        }