From 0b5aefbe0ff01638dd264222c5368ad02a0fe1ee Mon Sep 17 00:00:00 2001 From: Christopher Baines Date: Tue, 28 Feb 2012 19:09:23 +0000 Subject: Fixed two bugs relating to the query on the database not being ordered?, and implemented a new preference option. --- src/net/cbaines/suma/BusStopActivity.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/net/cbaines/suma/BusStopActivity.java') diff --git a/src/net/cbaines/suma/BusStopActivity.java b/src/net/cbaines/suma/BusStopActivity.java index 55a0bd6..8bded40 100644 --- a/src/net/cbaines/suma/BusStopActivity.java +++ b/src/net/cbaines/suma/BusStopActivity.java @@ -153,15 +153,15 @@ public class BusStopActivity extends OrmLiteBaseActivity impleme busStop = busStopDao.queryForId(busStopID); Dao busRouteDao = helper.getBusRouteDao(); - Dao routeStopsDao = helper.getRouteStopsDao(); + Dao routeStopsDao = helper.getRouteStopsDao(); for (BusRoute route : busRouteDao) { - QueryBuilder queryBuilder = routeStopsDao.queryBuilder(); + QueryBuilder queryBuilder = routeStopsDao.queryBuilder(); - queryBuilder.where().eq(RouteStops.ROUTE_ID_FIELD_NAME, route.id).and() - .eq(RouteStops.STOP_ID_FIELD_NAME, busStopID); + queryBuilder.where().eq(RouteStop.ROUTE_ID_FIELD_NAME, route.id).and() + .eq(RouteStop.STOP_ID_FIELD_NAME, busStopID); queryBuilder.setCountOf(true); - PreparedQuery preparedQuery = queryBuilder.prepare(); + PreparedQuery preparedQuery = queryBuilder.prepare(); long count = routeStopsDao.countOf(preparedQuery); -- cgit v1.2.3