setOrderBy does not seem to work....

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);
try {
container = new SQLContainer(tq);
} catch (SQLException e) {

need help on this


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?



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

did some debuging … for some reason the orderBys get set to null when the container is set

see screen shot…