diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2013-02-14 20:02:43 +1300 |
---|---|---|
committer | Anton Tananaev <anton.tananaev@gmail.com> | 2013-02-14 20:02:43 +1300 |
commit | 7d9d5a220e8f79ce1bc0d4b9931dc0c848e99c43 (patch) | |
tree | 549ec42093e9281a57d9b933efc6e01293f35b70 /src/org/traccar/web/server/model | |
parent | 9c3a57236022bd25556824db65098c3a0f909ed5 (diff) | |
download | trackermap-web-7d9d5a220e8f79ce1bc0d4b9931dc0c848e99c43.tar.gz trackermap-web-7d9d5a220e8f79ce1bc0d4b9931dc0c848e99c43.tar.bz2 trackermap-web-7d9d5a220e8f79ce1bc0d4b9931dc0c848e99c43.zip |
Actually remove device (fix #9)
Diffstat (limited to 'src/org/traccar/web/server/model')
-rw-r--r-- | src/org/traccar/web/server/model/DataServiceImpl.java | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/org/traccar/web/server/model/DataServiceImpl.java b/src/org/traccar/web/server/model/DataServiceImpl.java index 57357aa8..81130604 100644 --- a/src/org/traccar/web/server/model/DataServiceImpl.java +++ b/src/org/traccar/web/server/model/DataServiceImpl.java @@ -167,8 +167,7 @@ public class DataServiceImpl extends RemoteServiceServlet implements DataService try { device = entityManager.merge(device); user.getDevices().remove(device); - // If you want to remove device you need to remove all linked positions - //entityManager.remove(device); + entityManager.remove(device); entityManager.getTransaction().commit(); } catch (RuntimeException e) { entityManager.getTransaction().rollback(); |