summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/test/java/com/iciql/test/ModelsTest.java4
-rw-r--r--src/test/java/com/iciql/test/models/SupportedTypes.java7
2 files changed, 6 insertions, 5 deletions
diff --git a/src/test/java/com/iciql/test/ModelsTest.java b/src/test/java/com/iciql/test/ModelsTest.java
index 4230f4e..0b43c57 100644
--- a/src/test/java/com/iciql/test/ModelsTest.java
+++ b/src/test/java/com/iciql/test/ModelsTest.java
@@ -170,8 +170,8 @@ public class ModelsTest {
assertEquals(10, myStrings.size());
List<Integer> ids = db.from(SupportedTypes.SAMPLE)
- .orderByDesc(SupportedTypes.SAMPLE.id)
- .selectDistinct(SupportedTypes.SAMPLE.id);
+ .orderByDesc(SupportedTypes.SAMPLE.myInteger)
+ .selectDistinct(SupportedTypes.SAMPLE.myInteger);
assertEquals(10, ids.size());
assertEquals("[10, 9, 8, 7, 6, 5, 4, 3, 2, 1]", ids.toString());
}
diff --git a/src/test/java/com/iciql/test/models/SupportedTypes.java b/src/test/java/com/iciql/test/models/SupportedTypes.java
index 3b0e694..e04a3ab 100644
--- a/src/test/java/com/iciql/test/models/SupportedTypes.java
+++ b/src/test/java/com/iciql/test/models/SupportedTypes.java
@@ -74,7 +74,7 @@ public class SupportedTypes implements Serializable {
private Short myShort;
@IQColumn
- private Integer myInteger;
+ public Integer myInteger;
@IQColumn
private Long myLong;
@@ -138,7 +138,9 @@ public class SupportedTypes implements Serializable {
long oneday = 24 * 60 * 60 * 1000L;
for (int i = 0; i < 10; i++) {
- list.add(randomValue(now - (i * oneday)));
+ SupportedTypes s = randomValue(now - (i * oneday));
+ s.myInteger = i + 1;
+ list.add(s);
}
return list;
}
@@ -149,7 +151,6 @@ public class SupportedTypes implements Serializable {
s.myBool = new Boolean(rand.nextBoolean());
s.myByte = new Byte((byte) rand.nextInt(Byte.MAX_VALUE));
s.myShort = new Short((short) rand.nextInt(Short.MAX_VALUE));
- s.myInteger = new Integer(rand.nextInt());
s.myLong = new Long(rand.nextLong());
s.myFloat = new Float(rand.nextFloat());
s.myDouble = new Double(rand.nextDouble());