diff options
author | Anton Tananaev <anton@traccar.org> | 2022-05-27 17:27:10 -0700 |
---|---|---|
committer | Anton Tananaev <anton@traccar.org> | 2022-05-27 17:27:10 -0700 |
commit | 8ed7d6cd19f221c40e9994c0469009ff9c0e46b1 (patch) | |
tree | bfca6ce96520d2db4bd654b4977f82a37fbff5c6 /src/main/java/org/traccar/storage | |
parent | 79b5d08f45e8be4ff7d0072cd91fed39d5afe117 (diff) | |
download | trackermap-server-8ed7d6cd19f221c40e9994c0469009ff9c0e46b1.tar.gz trackermap-server-8ed7d6cd19f221c40e9994c0469009ff9c0e46b1.tar.bz2 trackermap-server-8ed7d6cd19f221c40e9994c0469009ff9c0e46b1.zip |
Fix several manager issues
Diffstat (limited to 'src/main/java/org/traccar/storage')
-rw-r--r-- | src/main/java/org/traccar/storage/DatabaseStorage.java | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/main/java/org/traccar/storage/DatabaseStorage.java b/src/main/java/org/traccar/storage/DatabaseStorage.java index e8966be8e..cd82448e1 100644 --- a/src/main/java/org/traccar/storage/DatabaseStorage.java +++ b/src/main/java/org/traccar/storage/DatabaseStorage.java @@ -128,9 +128,13 @@ public class DatabaseStorage extends Storage { conditions.add(new Condition.Equals( Permission.getKey(propertyClass), Permission.getKey(propertyClass), propertyId)); } - query.append(formatCondition(Condition.merge(conditions))); + Condition combinedCondition = Condition.merge(conditions); + query.append(formatCondition(combinedCondition)); try { QueryBuilder builder = QueryBuilder.create(dataSource, query.toString()); + for (Map.Entry<String, Object> variable : getConditionVariables(combinedCondition).entrySet()) { + builder.setValue(variable.getKey(), variable.getValue()); + } return builder.executePermissionsQuery(); } catch (SQLException e) { throw new StorageException(e); |