aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar
diff options
context:
space:
mode:
authorKhurshid Fayzullaev <khurshidfayzullaev@yahoo.com>2014-04-08 19:40:50 -0400
committerKhurshid Fayzullaev <khurshidfayzullaev@yahoo.com>2014-04-08 19:40:50 -0400
commit9c3f7f913766cbd6be85062179463eda751d5c3b (patch)
tree8f39eb1465b05d4191bbfb40e454ae05e6c538cc /src/org/traccar
parent3c0fa476056eb6c8cff57c8861cbc6fc63812ed5 (diff)
downloadetbsa-traccar-web-9c3f7f913766cbd6be85062179463eda751d5c3b.tar.gz
etbsa-traccar-web-9c3f7f913766cbd6be85062179463eda751d5c3b.tar.bz2
etbsa-traccar-web-9c3f7f913766cbd6be85062179463eda751d5c3b.zip
Update DataServiceImpl.java
Diffstat (limited to 'src/org/traccar')
-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 af2b81f..338f2fe 100644
--- a/src/org/traccar/web/server/model/DataServiceImpl.java
+++ b/src/org/traccar/web/server/model/DataServiceImpl.java
@@ -305,7 +305,7 @@ public class DataServiceImpl extends RemoteServiceServlet implements DataService
User user = getSessionUser();
entityManager.getTransaction().begin();
try {
- TypedQuery<Device> query = entityManager.createQuery("SELECT x FROM Device x WHERE x.id = :id", Device.class);
+ TypedQuery<Device> query = entityManager.createQuery("SELECT x FROM Device x WHERE x.uniqueId = :id", Device.class);
query.setParameter("id", device);
List<Device> results = query.getResultList();
@@ -332,7 +332,7 @@ public class DataServiceImpl extends RemoteServiceServlet implements DataService
synchronized (entityManager) {
entityManager.getTransaction().begin();
try {
- TypedQuery<Device> query = entityManager.createQuery("SELECT x FROM Device x WHERE x.id = :id", Device.class);
+ TypedQuery<Device> query = entityManager.createQuery("SELECT x FROM Device x WHERE x.uniqueId = :id", Device.class);
query.setParameter("id", device);
List<Device> results = query.getResultList();
if (results.isEmpty()) {