aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/database/DataManager.java
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2015-06-29 09:41:29 +1200
committerAnton Tananaev <anton.tananaev@gmail.com>2015-06-29 09:41:29 +1200
commit88b3f00f3855aa408c7859051efdcb5b37fe559f (patch)
tree7cb87b275298c7b15679fe07c19bf0ca1dd6dda8 /src/org/traccar/database/DataManager.java
parentcc893062eb540a198dc8c20c1379e94b5719fd5c (diff)
downloadtrackermap-server-88b3f00f3855aa408c7859051efdcb5b37fe559f.tar.gz
trackermap-server-88b3f00f3855aa408c7859051efdcb5b37fe559f.tar.bz2
trackermap-server-88b3f00f3855aa408c7859051efdcb5b37fe559f.zip
Fix postgres generated keys problem (fix #480)
Diffstat (limited to 'src/org/traccar/database/DataManager.java')
-rw-r--r--src/org/traccar/database/DataManager.java6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/org/traccar/database/DataManager.java b/src/org/traccar/database/DataManager.java
index 8b1ff2c2e..496a5a1b6 100644
--- a/src/org/traccar/database/DataManager.java
+++ b/src/org/traccar/database/DataManager.java
@@ -227,7 +227,7 @@ public class DataManager {
}
public void addUser(User user) throws SQLException {
- user.setId(QueryBuilder.create(dataSource, getQuery("database.insertUser"))
+ user.setId(QueryBuilder.create(dataSource, getQuery("database.insertUser"), true)
.setObject(user)
.executeUpdate());
Context.getPermissionsManager().refresh();
@@ -269,7 +269,7 @@ public class DataManager {
}
public void addDevice(Device device) throws SQLException {
- device.setId(QueryBuilder.create(dataSource, getQuery("database.insertDevice"))
+ device.setId(QueryBuilder.create(dataSource, getQuery("database.insertDevice"), true)
.setObject(device)
.executeUpdate());
}
@@ -306,7 +306,7 @@ public class DataManager {
}
public void addPosition(Position position) throws SQLException {
- position.setId(QueryBuilder.create(dataSource, getQuery("database.insertPosition"))
+ position.setId(QueryBuilder.create(dataSource, getQuery("database.insertPosition"), true)
.setObject(position)
.setDate("time", position.getFixTime()) // tmp
.setLong("device_id", position.getDeviceId()) // tmp