Aron11
(Aron Sereny)
1
here is my code; the container is displayed in a table but it is coming up ordered by th PK as if the orderBy is ignored…
private void initContainer() {
ArrayList orderBys = new ArrayList();
orderBys.add(new OrderBy(“zipcode”, true));
TableQuery tq = new TableQuery(“co_zipcode”, connectionPool);
tq.setOrderBy( orderBys);
tq.setVersionColumn(“version_id”);
try {
container = new SQLContainer(tq);
} catch (SQLException e) {
System.out.println(e.getMessage());
e.printStackTrace();
}
}
Kurki
(Teppo Kurki)
3
Hi,
which database are you using? Could you set your logging level to FINE and see from the log output what kind of query the container is generating?
-tepi
Aron11
(Aron Sereny)
4
Hi,
I am using MySQL 5.6; I added “general-log=1” to the mysql.ini and now seeing all the SQL statements looged in a log file.
all the selects on my table are still orderedBy “ID” (PK)
thanks for any insight
aron
Aron11
(Aron Sereny)
5
did some debuging … for some reason the orderBys get set to null when the container is set
see screen shot…
