List l = new ArrayList((Collection) q.execute());
assertEquals(2,l.size());
assertEquals(((ReachableItem)l.get(0)).getName(), "Bugs");
assertEquals(((ReachableItem)l.get(1)).getName(), "Road");
tx.commit();
<BUG>tx.begin();
q = pm.newQuery(ReachableItem.class);
q.setFilter("this != item && item.name.equals(\"Bugs\")");
q.declareVariables(ReachableItem.class.getName() + " item");

q.setOrdering("name ascending");</BUG>
l = new ArrayList((Collection) q.execute());

List l = new ArrayList((Collection) q.execute());
assertEquals(2,l.size());
assertEquals(((ReachableItem)l.get(0)).getName(), "Bugs");
assertEquals(((ReachableItem)l.get(1)).getName(), "Road");
tx.commit();
tx.begin();
q = pm.newQuery(ReachableItem.class).filter("this != item && item.name.equals(\"Bugs\")");
q.variables(ReachableItem.class.getName() + " item").orderBy("name ascending");
l = new ArrayList((Collection) q.execute());
