**%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%*\r
\r
- Fixed joins on primitives\r
+- Fixed group by on primitives\r
\r
### Older Releases\r
\r
}\r
\r
public Query<T> groupBy(boolean field) {\r
- return orderByPrimitive(field);\r
+ return groupByPrimitive(field);\r
}\r
\r
public Query<T> groupBy(byte field) {\r
- return orderByPrimitive(field);\r
+ return groupByPrimitive(field);\r
}\r
\r
public Query<T> groupBy(short field) {\r
- return orderByPrimitive(field);\r
+ return groupByPrimitive(field);\r
}\r
\r
public Query<T> groupBy(int field) {\r
- return orderByPrimitive(field);\r
+ return groupByPrimitive(field);\r
}\r
\r
public Query<T> groupBy(long field) {\r
- return orderByPrimitive(field);\r
+ return groupByPrimitive(field);\r
}\r
\r
public Query<T> groupBy(float field) {\r
- return orderByPrimitive(field);\r
+ return groupByPrimitive(field);\r
}\r
\r
public Query<T> groupBy(double field) {\r
- return orderByPrimitive(field);\r
+ return groupByPrimitive(field);\r
}\r
\r
Query<T> groupByPrimitive(Object field) {\r
import com.iciql.Db;
import com.iciql.Iciql.IQColumn;
import com.iciql.Iciql.IQTable;
+import com.iciql.util.IciqlLogger;
/**
* Tests of Joins.
assertEquals(3, notes.size());
}
+
+ @Test
+ public void testJoin() throws Exception {
+ db.insertAll(UserId.getList());
+ db.insertAll(UserNote.getList());
+
+ final UserId u = new UserId();
+ final UserNote n = new UserNote();
+
+ // this query returns 1 UserId if the user has a note
+ List<UserId> users = (List<UserId>) db.from(u).innerJoin(n).on(u.id).is(n.userId).groupBy(u.id).where(u.id).is(2).select();
+
+ db.dropTable(UserId.class);
+ db.dropTable(UserNote.class);
+
+ assertEquals(1, users.size());
+ }
@IQTable
public static class UserId {