aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/web/shared/model/Device.java
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2013-02-14 20:02:43 +1300
committerAnton Tananaev <anton.tananaev@gmail.com>2013-02-14 20:02:43 +1300
commit7d9d5a220e8f79ce1bc0d4b9931dc0c848e99c43 (patch)
tree549ec42093e9281a57d9b933efc6e01293f35b70 /src/org/traccar/web/shared/model/Device.java
parent9c3a57236022bd25556824db65098c3a0f909ed5 (diff)
downloadetbsa-traccar-web-7d9d5a220e8f79ce1bc0d4b9931dc0c848e99c43.tar.gz
etbsa-traccar-web-7d9d5a220e8f79ce1bc0d4b9931dc0c848e99c43.tar.bz2
etbsa-traccar-web-7d9d5a220e8f79ce1bc0d4b9931dc0c848e99c43.zip
Actually remove device (fix #9)
Diffstat (limited to 'src/org/traccar/web/shared/model/Device.java')
-rw-r--r--src/org/traccar/web/shared/model/Device.java3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/org/traccar/web/shared/model/Device.java b/src/org/traccar/web/shared/model/Device.java
index 0b5fe30..ede3c5f 100644
--- a/src/org/traccar/web/shared/model/Device.java
+++ b/src/org/traccar/web/shared/model/Device.java
@@ -17,6 +17,7 @@ package org.traccar.web.shared.model;
import java.io.Serializable;
+import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
@@ -48,7 +49,7 @@ public class Device implements Serializable {
return id;
}
- @OneToOne(fetch = FetchType.EAGER)
+ @OneToOne(fetch = FetchType.EAGER, cascade = CascadeType.REMOVE)
private Position latestPosition;
public Position getLatestPosition() {