diff options
author | Khurshid Fayzullaev <khurshidfayzullaev@yahoo.com> | 2014-04-08 19:40:50 -0400 |
---|---|---|
committer | Khurshid Fayzullaev <khurshidfayzullaev@yahoo.com> | 2014-04-08 19:40:50 -0400 |
commit | 9c3f7f913766cbd6be85062179463eda751d5c3b (patch) | |
tree | 8f39eb1465b05d4191bbfb40e454ae05e6c538cc /src/org/traccar/web/server/model/DataServiceImpl.java | |
parent | 3c0fa476056eb6c8cff57c8861cbc6fc63812ed5 (diff) | |
download | trackermap-web-9c3f7f913766cbd6be85062179463eda751d5c3b.tar.gz trackermap-web-9c3f7f913766cbd6be85062179463eda751d5c3b.tar.bz2 trackermap-web-9c3f7f913766cbd6be85062179463eda751d5c3b.zip |
Update DataServiceImpl.java
Diffstat (limited to 'src/org/traccar/web/server/model/DataServiceImpl.java')
-rw-r--r-- | src/org/traccar/web/server/model/DataServiceImpl.java | 4 |
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 af2b81fd..338f2fef 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()) { |