From 5100c457ad2f1faf1cffa8503c6baaf3a26c5d89 Mon Sep 17 00:00:00 2001 From: Anton Tananaev Date: Thu, 10 Jan 2013 23:42:16 +1300 Subject: Archive panel and some map features --- src/org/traccar/web/server/model/DataServiceImpl.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/org/traccar/web/server') diff --git a/src/org/traccar/web/server/model/DataServiceImpl.java b/src/org/traccar/web/server/model/DataServiceImpl.java index f9d0e7e3..9c69b48e 100644 --- a/src/org/traccar/web/server/model/DataServiceImpl.java +++ b/src/org/traccar/web/server/model/DataServiceImpl.java @@ -142,7 +142,8 @@ public class DataServiceImpl extends RemoteServiceServlet implements DataService try { device = entityManager.merge(device); user.getDevices().remove(device); - entityManager.remove(device); + // If you want to remove device you need to remove all linked positions + //entityManager.remove(device); entityManager.getTransaction().commit(); } catch (Exception e) { entityManager.getTransaction().rollback(); -- cgit v1.2.3