fix for fix of bug 4292: device identifier for query now assembled correctly

Change-Id: Iebf95a7c7d5982299ff06773570779ba358c6480
This commit is contained in:
Axel Uhl committed 2017-08-31 13:49:17 +02:00
1 parent 1dd933e216
commit 1ff206ba39
1 file changed
+1 -3
@@ -325,9 +325,7 @@ public class MongoSensorFixStoreImpl implements MongoSensorFixStore {
throws TransformationException, NoCorrespondingServiceRegisteredException {
Map<DeviceIdentifier, FixT> result = new HashMap<>();
for (final DeviceIdentifier deviceIdentifier : forDevices) {
final DBObject deviceQuery = new BasicDBObject(
FieldNames.DEVICE_ID.name(),
deviceIdentifier.getStringRepresentation());
final DBObject deviceQuery = getDeviceQuery(deviceIdentifier);
final DBObject orderBy = new BasicDBObject(
FieldNames.GPSFIX.name() + "." + FieldNames.TIME_AS_MILLIS.name(), -1);
DBCursor lastFixForDeviceCursor = fixesCollection.find(deviceQuery).sort(orderBy).limit(1);