aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/web
diff options
context:
space:
mode:
authorKhurshid Fayzullaev <khurshidfayzullaev@yahoo.com>2014-04-08 19:45:40 -0400
committerKhurshid Fayzullaev <khurshidfayzullaev@yahoo.com>2014-04-08 19:45:40 -0400
commit438ee014d2b786e634049068b3e866e357e1aafe (patch)
tree4c7a5144865c71258552a6db0caeae54da9d6428 /src/org/traccar/web
parent9c3f7f913766cbd6be85062179463eda751d5c3b (diff)
downloadtrackermap-web-438ee014d2b786e634049068b3e866e357e1aafe.tar.gz
trackermap-web-438ee014d2b786e634049068b3e866e357e1aafe.tar.bz2
trackermap-web-438ee014d2b786e634049068b3e866e357e1aafe.zip
Update DataServiceImpl.java
Diffstat (limited to 'src/org/traccar/web')
-rw-r--r--src/org/traccar/web/server/model/DataServiceImpl.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/org/traccar/web/server/model/DataServiceImpl.java b/src/org/traccar/web/server/model/DataServiceImpl.java
index 338f2fef..9706eb1b 100644
--- a/src/org/traccar/web/server/model/DataServiceImpl.java
+++ b/src/org/traccar/web/server/model/DataServiceImpl.java
@@ -306,7 +306,7 @@ public class DataServiceImpl extends RemoteServiceServlet implements DataService
entityManager.getTransaction().begin();
try {
TypedQuery<Device> query = entityManager.createQuery("SELECT x FROM Device x WHERE x.uniqueId = :id", Device.class);
- query.setParameter("id", device);
+ query.setParameter("id", device.getUniqueId());
List<Device> results = query.getResultList();
if (results.isEmpty()) {
@@ -333,7 +333,7 @@ public class DataServiceImpl extends RemoteServiceServlet implements DataService
entityManager.getTransaction().begin();
try {
TypedQuery<Device> query = entityManager.createQuery("SELECT x FROM Device x WHERE x.uniqueId = :id", Device.class);
- query.setParameter("id", device);
+ query.setParameter("id", device.getUniqueId());
List<Device> results = query.getResultList();
if (results.isEmpty()) {
device = entityManager.merge(device);