diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2013-02-16 16:55:44 +1300 |
---|---|---|
committer | Anton Tananaev <anton.tananaev@gmail.com> | 2013-02-16 16:55:44 +1300 |
commit | 6d48729efb4bd1ac34bba003a8a4313a70a02cce (patch) | |
tree | b834c03b8aeb3302bedb949a63f6b6d0ed4f2600 /src/org/traccar/web/server/model/DataServiceImpl.java | |
parent | 11b7037755c08654fba3b3781f83445244582d59 (diff) | |
download | trackermap-web-6d48729efb4bd1ac34bba003a8a4313a70a02cce.tar.gz trackermap-web-6d48729efb4bd1ac34bba003a8a4313a70a02cce.tar.bz2 trackermap-web-6d48729efb4bd1ac34bba003a8a4313a70a02cce.zip |
Handle clicks on markers (fix #8)
Diffstat (limited to 'src/org/traccar/web/server/model/DataServiceImpl.java')
-rw-r--r-- | src/org/traccar/web/server/model/DataServiceImpl.java | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/org/traccar/web/server/model/DataServiceImpl.java b/src/org/traccar/web/server/model/DataServiceImpl.java index e48fa73c..287a5684 100644 --- a/src/org/traccar/web/server/model/DataServiceImpl.java +++ b/src/org/traccar/web/server/model/DataServiceImpl.java @@ -152,6 +152,7 @@ public class DataServiceImpl extends RemoteServiceServlet implements DataService try { entityManager.persist(device); user.getDevices().add(device); + entityManager.merge(user); entityManager.getTransaction().commit(); return device; } catch (RuntimeException e) { @@ -191,6 +192,7 @@ public class DataServiceImpl extends RemoteServiceServlet implements DataService device = entityManager.merge(device); user.getDevices().remove(device); entityManager.remove(device); + entityManager.merge(user); entityManager.getTransaction().commit(); return device; } catch (RuntimeException e) { |